Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2006-01-07 06:49:34


Tobias Schwinger wrote:
> 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.

It didn't compile because I included enable_if.hpp and is_function.hpp
only for emulation mode. Now your code compiles fine.

-- 
Alexander Nasonov

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