Boost logo

Boost :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-05-10 06:47:35


> C:\Documents and
> Settings\pdimov\cvs\boost\boost\type_traits\arithmetic_traits.hpp(68) :
> error C2908: explicit specialization; 'boost::is_integral<T>' has already
> been instantiated from the primary template
> with
> [
> T=__int64
> ]
>
> when both BOOST_HAS_LONG_LONG and BOOST_HAS_MS_INT64 are defined.
>
> I'm using boost/function.hpp, FWIW.
>

I don't understand that, arithmetic_traits.hpp uses:

# if defined(BOOST_HAS_LONG_LONG)
template <> struct is_integral<unsigned long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<long long>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#elif defined(BOOST_HAS_MS_INT64)
template <> struct is_integral<unsigned __int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
template <> struct is_integral<__int64>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#endif

So you should get specialisations for one or the other and never both.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk