Boost logo

Boost Users :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2008-05-27 11:19:58


Hansi wrote:

> I have now made the following declaration:
>
> boost::lexical_cast<boost::mpl::if_< boost::is_pointer<typename
> Value>,
> boost::remove_pointer<typename Value>::type,
> typename Value>>::type>(newVal);
>
>
> It works now for pointers too, but now I have the problem with the char
> type. First I have made a specialization for this type. Is it here also
> possible to make only one specialization or have I to provide both for
> pointer and value?

There is a boost::is_same that you could use for comparing T to char*
and/or char const*. I don't think you'll get the behavior you are
after, but it will let you do what you've set out to do.


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