Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-01-06 21:18:09


Alexander Nasonov wrote:
> Tobias Schwinger wrote:
>
>>Sorry for jumping in here. But I believe that
>>
>> #ifndef BOOST_NO_SFINAE
>> namespace boost { namespace type_of {
>> template<typename T>
>> typename enable_if<is_function<T>, T &>::type
>> ensure_obj(T &);
>> } }
>> #endif
>> // verified to solve the problem with GCC 3.2.3
>>
>>is a much nicer solution to the problem you describe (because it leaves
>>scalability up to boost::is_function).
>
>
> Unfortunately, this doesn't compile neither on gcc 3.3.x nor on gcc 3.2.3.

Did you try catching T volatile & as a workaround?

     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8503

Well, it compiles fine on my copy of GCC (MinGW) and in MinGW 3.2.3 that bug is
patched away (although it still doesn't match a function reference with T const &
as GCC 3.4 does).


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