
5 Jun
2007
5 Jun
'07
6:24 a.m.
Hi everybody, I have an template function, and I want to know if it return void, but it does not work: template<typename T> struct is_foo_void : boost::is_void<BOOST_TYPEOF(T::foo(123))>{}; struct foo_struct { template<typename T> static void foo(T){} }; BOOST_STATIC_ASSERT(is_foo_return_void<foo_struct>::value); //////////////////////////////////////////////////////////// Yes, I know funtion_traits would be help if I have a non-template function, but in this case I can't, what should I do?