October 04, 2005 A static attribute in a parent template class can't be created. - Example.zip | ||||
|---|---|---|---|---|
| ||||
Attachments: | Hello!
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
working.
(pseudo copy)
<< first .h file>>
namespace conversion
{
template <class T>
class refCount
{
public:
static std::map<void*,void*> objectList;
...
};
};
<<new .h file>>
class example;
class example: public refCount<<example>>
{
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 example.
I'll attach the three real files for added enjoyment.
Thanks for any help!
Cary FitzHugh
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply