Boost logo

Boost Users :

From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2005-08-26 05:04:18

Alan M. Carroll <amc <at>> writes:
> Is this as simple as it gets?
> Ah, finally, I have an MPL variant that works:
> struct get_key_type { template < typename T > struct apply { typedef
typename T::key_type type; }; };
> typedef typename boost::mpl::eval_if_c<IS_OUTER,
> typename boost::mpl::apply<get_key_type, PAYLOAD>,
> typename boost::mpl::identity<PAYLOAD>
> >::type testing;

You can make it simpler:

template<typename T>
struct get_key_type
  typedef typename T::key_type type;

typedef typename boost::mpl::eval_if_c<
>::type testing;

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at