Boost logo

Boost :

Subject: Re: [boost] [result_of] fails with clan (C++11)
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-11-28 09:14:21


On 28/11/12 08:42, Oliver Kowalke 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?
>
> it's called inside a templated function:
> template< typename Fn >
> void g(BOOST_RV_RV( Fn) fn){
> BOOST_STATIC_ASSERT(...)
> ....}

remove the reference from Fn (at least in C++11).
I don't know what the actual type of Fn is in C++03.


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