3 Feb
2009
3 Feb
'09
9:23 p.m.
Steven Watanabe
er
writes: Hi All,
I'm looking for template<typename> class F such that
F<T>::type is T::type if it exists, T itself otherwise. [...] Something like this could do: [...] Wouldn't it be easier to use the MPL components
AMDG Joaquin M Lopez Munoz wrote: that already exist?
BOOST_MPL_HAS_XXX_TRAIT_DEF(type);
template<class T> struct nested_type : boost::mpl::eval_if
{};
Oh, yes, that's definitely the way to go, didn't remember about BOOST_MPL_HAS_XXX_TRAIT_DEF. Sorry for the noise. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo