
11 Nov
2012
11 Nov
'12
6:41 p.m.
On Sun, Nov 11, 2012 at 2:20 AM, Gennadiy Rozental <rogeeff@gmail.com>wrote:
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:
Uggg. That's definitely a compiler bug, and a very annoying one at that. As was suggested, using the type form of enable_if should probably work. On the plus side, I imagine this bug will be fixed given that there is std::enable_if now, which takes a boolean constant (and no corresponding disable_if or type forms), so people even outside of the boost community will be running into the same problem. -- -Matt Calabrese