www.digitalmars.com         C & C++   DMDScript  

c++ - A static attribute in a parent template class can't be created. - Example.zip


I've got a 'situation' here. I think this should work... Any ideas?
I want to have a template which specifies a static stl map and other stuff.
And then derive from it and create that static stl map.  It doesn't seem to be 

(pseudo copy)

<< first .h file>>
namespace conversion
template <class T>
class refCount
static std::map<void*,void*> objectList;

<<new .h file>>

class example;

class example: public refCount<<example>>
{ }

<< cpp file >>

std::map<void*, void*> example::objectList;

When I try to compile it tells me that objectList is not a member of the struct

I'll attach the three real files for added enjoyment.

Thanks for any help!

Cary FitzHugh
Oct 04 2005