
On Tue, Nov 27, 2012 at 12:47 PM, Oliver Kowalke <oliver.kowalke@gmail.com>wrote:
Hello, clang (c++11 support) fails on code like:
BOOST_STATIC_ASSERT(( is_same< void, typename result_of< Fn() >::type >::value));
with error:
no type named 'type' in 'boost::result_of<void (&())(X &)>' is_same< void, typename result_of< Fn() >::type >::value)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~**~~
Does Fn == void (&)(X&) or void (X&) ? I.e., is it a unary function type? There might've been a recent change only for Clang to allow result_of to be better usable with SFINAE: result_of< F ( Args... ) > doesn't have a nested type typedef if F ( Args... ) is ill-formed (which appears to be the case here). ../boost/static_assert.hpp:48:**50: note: expanded from macro
'BOOST_STATIC_ASSERT' # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) ^
Do you know why it fails? (other compilers like gcc, intel, msvc compile the code)
- Jeff