
7 Jan
2006
7 Jan
'06
11:49 a.m.
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