
I'd like to do something like: typedef typename boost::mpl::if_< typename base::is_container<T>::type, typename T::element_type, T>::type ElementType_; such that T may be a primitive type. The above doesn't work since, for example, there's no such thing as int::element_type. Is there a simple way (eg don't have to do template specialization for all container types) to do the above? Thanks, Noel

Try mpl::eval_if
Chris
On 8/2/06, Noel Yap
I'd like to do something like:
typedef typename boost::mpl::if_< typename base::is_container<T>::type, typename T::element_type, T>::type ElementType_;
such that T may be a primitive type. The above doesn't work since, for example, there's no such thing as int::element_type. Is there a simple way (eg don't have to do template specialization for all container types) to do the above?
Thanks, Noel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Chris Weed
-
Noel Yap