boost::result_of and gcc

Hello,
I'm running into a problem when using boost::result_of with gcc 3.4.2
and 4.2.1 (with MingW).
The following program compiles fine with Visual C++ 8.0, but not with gcc:
-------------------------------
#include

Martin Ecker wrote:
Hello,
I'm running into a problem when using boost::result_of with gcc 3.4.2 and 4.2.1 (with MingW).
The following program compiles fine with Visual C++ 8.0, but not with gcc:
<snip code>
I get the same error if I simply wrap test_function1 in another template class as nested struct and then use it instead of test_function2.
Am I attempting to do something fundamentally wrong here, or is it a bug in gcc?
It's a compiler bug fixed with GCC 4.2.2. But it's often a good idea to deduce the function object's type (especially in case operator() is const qualified): template< class Self, typename T > struct result< Self(T) > ... Regards, Tobias
participants (2)
-
Martin Ecker
-
Tobias Schwinger