
17 Mar
2005
17 Mar
'05
6:25 p.m.
"Ian McCulloch" <ianmcc@physik.rwth-aachen.de> wrote
lack of SFINAE is a real showstopper for me. I want to write functions like
template <typename T> typename result_of<negate(T)>::type operator-(T const& x) { return negate()(x); }
but the lack of SFINAE here makes boost::result_of essentially useless for this. But I imagine it won't be difficult to make a new version based on boost that would work.
FWIW: template<class T> T make(); template <class T> BOOST_TYPEOF_TPL(make<std::negate<T> >()(T())) operator-(T const& x) { return std::negate<T>()(x); } Regards, Arkadiy