D
Dave Johansen
Is it possible to specialized numeric_limits with a templated type?
For example:
template<unsigned int DIGITS>
class BigInt
{
...
};
template<unsigned int DIGITS>
template<> class std::numeric_limits<BigInt<DIGITS> >
{
...
};
I tried this with Visual C++ 2008 and it spit out the error "error
C2913: explicit specialization; 'std::numeric_limits<BigInt<DIGITS>>'
is not a specialization of a class template".
Is there a way to make this work? Or is explicit specialization using
a templated typed not allowed in C++?
Thanks,
Dave
For example:
template<unsigned int DIGITS>
class BigInt
{
...
};
template<unsigned int DIGITS>
template<> class std::numeric_limits<BigInt<DIGITS> >
{
...
};
I tried this with Visual C++ 2008 and it spit out the error "error
C2913: explicit specialization; 'std::numeric_limits<BigInt<DIGITS>>'
is not a specialization of a class template".
Is there a way to make this work? Or is explicit specialization using
a templated typed not allowed in C++?
Thanks,
Dave