Std::vector< std::vector<> > in root class

Dear experts,

I have a class which contains, a std::vector of vectors.

I don’t want to store this class in a tree or draw it, or anything, I just want to use this class as a container in my program, which elsewhere requires root libraries.

If I comment out everything in my code which doesn’t use std::vector< std::vector> > the compilation is fine.

Do I need to add something into my LinkDef file to compile my class correctly?

The error occurs when generating the dictionary:
Syntax error prec_stl/memory:56:

A test with a simple class:

#include <vector>
class test
      test() {};
      typedef std::vector< std::vector<int> > dvec;

Throws the same error.



This has been discussed here:

I tried:

#pragma link C++ class vector< vector >+;
#pragma link C++ class vector< vector >+;
#pragma link C++ class std::vector< std::vector >+;
#pragma link C++ class std::vector+;

… and the same without the plusses…, and with ! instead of the plusses.

None of these worked. All gave me the same error.

I am now going to try never using a dictionary… which should be fine for my classes, but probably not for the future if I ever want to use my classes as a macro on the command line.

So it would still be nice to see the fix for this.




Rather than

#pragma link C++ class vector< vector<long unsigned int> >+; try:


PS. If you do not need to store this class and do not intent on using it from the interpreter then it is fine not to generate a dictionary

Thanks for your reply.