
23 Feb
2006
23 Feb
'06
2:26 p.m.
Could anybody with one of those compilers installed help me figure out why they complain about this code: //--------------- #include <boost/typeof/typeof.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/static_assert.hpp> void f() {} template<class T> class x { BOOST_STATIC_ASSERT(( boost::is_same<BOOST_TYPEOF_TPL(&f), void(*)()>::value )); }; //--------------- I suspect the problem is related to the test itself rather than to typeof, and might be workarounded (or is it "worked around"?) with a couple of intermediate typedefs, but I might be wrong... Thanks in advance, Arkadiy