template question

C

Chameleon

Where is the problem in the code below?

The g++ error message is:
(all throwed in the last line)

`Texture' was not declared in this scope
template argument 2 is invalid
expected `{' before '>' token
expected unqualified-id before '>' token
declaration of `class TextureUnit<K>'

--------------------------------------
template<typename K>
class Texture {};

template<typename K>
class TextureUnit : public ObjectPool<K, Texture<K> > {};
--------------------------------------
 
K

Kai-Uwe Bux

Chameleon said:
O/H Chameleon ??????:

In case, your question still stands: you have not provided code that
exhibits the problem as the following compiles without trouble

template<typename K>
class Texture {};

template<typename K, typename V>
class ObjectPool {};

template<typename K>
class TextureUnit : public ObjectPool<K, Texture<K> > {};

int main ( void ) {}


Best

Kai-Uwe Bux
 
C

Chameleon

Where is the problem in the code below?
In case, your question still stands: you have not provided code that
exhibits the problem as the following compiles without trouble

template<typename K>
class Texture {};

template<typename K, typename V>
class ObjectPool {};

template<typename K>
class TextureUnit : public ObjectPool<K, Texture<K> > {};

int main ( void ) {}



oooops!
lame!

My fault!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top