We want a vector with 255 individual TVector3’s in it - yes . gcc accepts the syntax and does the right thing ( confirmed in gdb ) . ROOT5 creates a dictionary that compiles . ROOT6 also makes a dictionary without errors but gcc won’t compile it. So to me it looks like cling is mangling / misinterpreting the construct ( but cint doesn’t )
This is not what the code provided does. It creates 255 vectors which an unspecified number of TVector3 inside each of those vectors. You probably meant to use:
std::vector<TVector3> { 255 };
which create a single vector with 255 slots for TVector3 objects.
ROOT5 creates a dictionary that compiles .
It does compiles but it does not “work”. The result is that only the first of the 255 vectors is stored.
More importantly I noticed that your dictionary is using the “very old” I/O streaming technique (that generate a Streamer function). That 2 main weakness of this old technique is poor/broken support for STL container and no support for splitting or I/O customization rules.
Switching to the new StreamerInfo based I/O streaming technique will remove that code from the dictionary entirely. To do so, in your LinkDef file add a trailing + to the dictionary request: