
29 May
2009
29 May
'09
8:58 p.m.
Steven Watanabe wrote:
Something like this should work:
template<class Cond, class If, class Else, class Tester = boost::mpl::true_> struct if_ { typedef Else type; };
template<class Cond, class If, class Else> struct if_<Cond, If, Else, boost::mpl::bool_<Cond::value> > { typedef If type; };
but it may be less portable. What about testing it ? Maybe we can even take advantage of the running Bug Spree week ? I have more than 300 invocation of enable_if and maybe 100 use of if_ in my main library and I'll give my left hand for getting those faster.
________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35