|
Boost : |
Subject: Re: [boost] enable_if quirk? bug?
From: Evgeny Panasyuk (evgeny.panasyuk_at_[hidden])
Date: 2012-11-11 03:29:35
11.11.2012 11:20, Gennadiy Rozental wrote:
> template<typename T>
> inline typename boost::enable_if_c<!boost::is_float<T>::value, int>::type
> foo( T&& v );
>
> template<typename T>
> inline typename boost::enable_if_c<!boost::is_float<T>::value, int>::type
> foo( T&& v )
> {
> return 1;
> }
>
> ...
> foo(1);
>
> MSVC 10 producing this error:
I have just reproduced this error on MSVC2010.
BTW, disable_if_c seems like works:
template<typename T>
inline typename boost::disable_if_c<boost::is_float<T>::value, int>::type
foo( T&& v );
template<typename T>
inline typename boost::disable_if_c<boost::is_float<T>::value, int>::type
foo( T&& v )
{
return 1;
}
-- Evgeny Panasyuk
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk