Boost logo

Boost Users :

From: Chris Weed (chrisweed_at_[hidden])
Date: 2006-08-02 13:04:17


Try mpl::eval_if
Chris

On 8/2/06, Noel Yap <noel.yap_at_[hidden]> wrote:
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net