I am porting code that works on root5.34 (and earlier) to produce a library loadable for my analysis code and root macros. It fails on root6.02.05 even after I have modified it to correspond to root6 examples. The errors are:
g++ -std=c++11 Dic.C -c -o Dic.o -I/home/olin/root6/root-6.02.05/include -O2 -g -std=c++11 -Wall -Wno-deprecated -fPIC -m64
Dic.C: In member function ‘virtual void TVF48SiMap::Streamer(TBuffer&)’:
Dic.C:132:27: error: ‘std::string’ has no member named ‘Streamer’
siname_[0][R__i].Streamer(R__b);
^
Dic.C:138:24: error: ‘std::string’ has no member named ‘Streamer’
Siname_[R__i].Streamer(R__b);
^
Dic.C:153:27: error: ‘std::string’ has no member named ‘Streamer’
siname_[0][R__i].Streamer(R__b);
^
Dic.C:159:24: error: ‘std::string’ has no member named ‘Streamer’
Siname_[R__i].Streamer(R__b);
^
They occur using both gcc4.8.3 and gcc 4.9.2, independent of whether I use rootcint or rootcling and independent of the -std=c++11 flag.
I can work around this by replacing the string declarations with TString, but then I get warnings:
bin/Dic.C: In member function ‘virtual void TVF48SiMap::Streamer(TBuffer&)’:
bin/Dic.C:2660:40: warning: iteration 48u invokes undefined behavior [-Waggressive-loop-optimizations]
siname_[0][R__i].Streamer(R__b);
^
bin/Dic.C:2659:7: note: containing loop
for (R__i = 0; R__i < 384; R__i++)
^
bin/Dic.C:2681:40: warning: iteration 48u invokes undefined behavior [-Waggressive-loop-optimizations]
siname_[0][R__i].Streamer(R__b);
^
bin/Dic.C:2680:7: note: containing loop
for (R__i = 0; R__i < 384; R__i++)
The compilation was
g++ -I/home/olin/root6/root-6.02.05/include -O2 -g -std=c++11 -Wall -Wno-deprecated -fPIC -m64 -c TVF48SiMap.cxx -o TVF48SiMap.o
/home/olin/root6/root-6.02.05/bin/rootcint -f Dic.C TVF48SiMap.h alphaAnalysisLinkDef.h
g++ -std=c++11 Dic.C -c -o Dic.o -I/home/olin/root6/root-6.02.05/include -O2 -g -std=c++11 -Wall -Wno-deprecated -fPIC -m64
TVF48SiMap.h (1.81 KB)
TVF48SiMap.cxx (4.96 KB)
alphaAnalysisLinkDef.h (153 Bytes)