June 15, 2003 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
{ };
template<>
struct A<B<unsigned char>::val>
{ };
template<>
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?
|
Copyright © 1999-2021 by the D Language Foundation