Hello Matt, I am still unable to reproduce the problem, however, I noticed an interesting thing. Error: Can't call vector<const TKey*,__malloc_alloc_template<0> >::size() If we look carefully, 2nd argument of vector templte is __malloc_alloc_template<0>. This only happens if you include $CINTSYSDIR/lib/prec_stl/vector. This header must only be used when compiling STL precompiled library. Something is wrong if you include this file when you are running ROOT. You should include $ROOTSYS/cint/stl/_vector.h or $CINTSYSDIR/stl/_vector.h. Please look into $ROOOTSYS/cint/stl/vector or $CINTSYSDIR/stl/vector. Macro __MAKECINT__ must not be defined when you interpret macros. And it is strange that you can instantiate those template. If you include $CINTSYSDIR/lib/prec_stl/vector, you shouldn't be able to instantiate vector object because default constructor definition is missing. It is really strange that , at least, you can instantiate it. I recommend you to check if correct version of STL headers are included. Thank you Masaharu Goto >Hi Masaharu, > >Philippe asked me for the same details. I have attached the emails hat I >sent him, which includes all of the details that reproduce the problem. >FYI, I first encountered the problem using ROOT 2.25.03. However, the >problem disappeared in ROOT 2.26.01. > >Thank you for your help. > >Regards, Matt > >> >Hi Masa and ROOT Team, >> > >> >It appears that std::vector<T> is broken when T is a pointer to a >> >non-builtin type. Here is the output from ROOT 2.25.03 which >demonstrates >> >the problem: >> > >> >root [0] #include <vector> >> >root [1] vector< const int* > int_cp_list >> >root [2] cout << int_cp_list.size(); >> >root [3] #include <TKey.h> >> >root [4] vector< const TKey* > key_cp_list >> >root [5] cout << key_cp_list.size(); >> >Error: Can't call vector<const TKey*,__malloc_alloc_template<0> >::size() >in
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET