mam sobie klasę A:
class A {/* ... */};
oraz w innym pliku:
class A ;
typedef std::set<A*> SetOfA ;
typedef SetOfA::iterator SetOfAIterator ;
spoko.
chciałem dodać klasę, a właściwie szablon:
template <class TX, class TZ>
class B {/* ... */};
spoko.
chciałem zrobić analogiczne typedefy w tamtym pliku.
próbowałem różnie:
template <class TX, class TZ>
class B;
template<class TX, class TZ>
typedef std::set<B<TX, TZ>*> SetOfB ;
typedef SetOfB::iterator SetOfBIterator ;
i nie potrafię. najczęściej pojawia się:
error: template declaration of ‘typedef’
jak to zrobić poprawnie?