Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::any and const pointers
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-12-02 17:03:20


AMDG

James C. Sutherland wrote:
> Thank you!
> That works great for pointers, but now not for POD, e.g.,
> const int m = get<int>(p,"int");
> Any ideas of how to get this to work with POD and pointers?
>

typename boost::mpl::eval_if<is_pointer<T>,
    boost::add_pointer<
        typename boost::add_const<
            typename boost::remove_pointer<T>::type
>::type
>,
    boost::add_const<T>
>::type

In Christ,
Steven Watanabe


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