www.digitalmars.com         C & C++   DMDScript  

c++.beta - class template specialization: already defined

template<class T>
struct B
  static const int val = sizeof(T);

template <int i>
struct A;

template <>
struct A<B<unsigned char>::val>;

template <>
struct A<B<unsigned short>::val>;

template<int i>
struct A
{ };

struct A<B<unsigned char>::val>
{ };

struct A<B<unsigned short>::val>
// Error: 'A' is already defined
{ };

Extracted from Boost's crc library.

bye, Christof

http://cmeerw.org                                 JID: cmeerw jabber.at
mailto cmeerw at web.de

...and what have you contributed to the Net?
Jun 15 2003