Stl list for unsigned short, short, unsigned int

I have a problem using std::list with types mentioned in the topic. I use an svn 5.27 version of root (however, not the most recent). The sample below works with a simple int, but not with short, unsigned short, unsigned int. Am I doing something wrong?

#include <list>

void test_stl()
{
	std::list<unsigned int> ilist;
	
	for(unsigned int i=0; i<10; i++) ilist.push_back(i);
	
	std::list<unsigned int>::iterator li;
	li=ilist.begin();
	cout << ilist.back() << endl;
	cout << *li << endl;
	li++;
	cout << *li << endl;
}

I receive message:

Error: Illegal pointer operation (tovalue) test_stl.C:12: (class G__CINT_ENDL)36966256 *** Interpreter error recovered ***

Hi,

Only the dictionary for the following list:#pragma link C++ class list<int>; #pragma link C++ class list<long>; #pragma link C++ class list<float>; #pragma link C++ class list<double>; #pragma link C++ class list<void*>; #pragma link C++ class list<char*>; #pragma link C++ class list<string>; is provided by default. For all the other list you need to either generate the dictionary yourself; i.e. using a file like:// loader.C #include <list> #ifdef __MAKECINT__ #pragma link C++ class list<unsigned int>; #endif and load viaroot [] .L loader.C+or simply compile your script via ACLiC (i.e. .L myscript.C+)

Cheers,
Philippe.

Thanks. Somehow I thought the self-generating dictionary stuff is only for compiled code :wink: