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
{
public:
test() {};
typedef std::vector< std::vector<int> > dvec;
private:
ClassDef(test,0)
}
#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.