Seen it just now here.
Never met such construction before and I do not understand, what it means! And how it works in specialization, as typedefs do not generate new types:
Wrong:
template <typename T>
void a();
typedef int a_t;
typedef int b_t;
template<> void a<a_t>(){}
template<> void a<b_t>(){}
Compiles with warning: 'typedef' was ignored in this declaration, works as expected:
template <typename T>
void a();
typedef class a_t;
typedef class b_t;
template<> void a<a_t>(){}
template<> void a<b_t>(){}
I finally unsserstood, how it works.
is not like
but like
So, I forward declared
class a_tand thentypedef‘d it to nothing. It also explains warning`typedef' was ignored in this declarationand all templates related stuff.