
11 Nov
2012
11 Nov
'12
8:29 a.m.
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