[ROOT] 2.25.03: STL vector broken for class pointers

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Mon Nov 20 2000 - 18:31:31 MET


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
current scope FILE:/tmp/filewcdgda_cint LINE:1
Possible candidates are...
filename       line:size busy function type and name  (in vector<const
TKey*,__malloc_alloc_template<0> >)
Error: No symbol key_cp_list in current scope  FILE:/tmp/filewcdgda_cint
LINE:1
Error: Failed to evaluate key_cp_list.size() FILE:/tmp/filewcdgda_cint
LINE:1
Possible candidates are...
filename       line:size busy function type and name
00*** Interpreter error recovered ***
root [6]

Regards, Matt

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET