Ben Hutchings
Alan M. Carroll wrote:
typedef typename boost::mpl::if_c
::type testing; That can't work. All the template arguments to boost::mpl::if_c must be syntactically valid after substiution of C's template parameters, and clearly that won't be the case. I think you need to write your own selection template:
template
struct type_or_key_type { typedef T type; }; template<typename T> struct type_or_key_type { typedef typename T::key_type type; }; then use
typedef typename type_or_key_type
::type testing;
I'd normally solve it this way: template <class T> struct key_type { typedef typename T::key_type type; }; typedef mpl::eval_if_c< IS_OUTER , key_type<PAYLOAD> , mpl::identity<PAYLOAD> >::type testing; HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com