Boost logo

Boost Users :

Subject: Re: [Boost-users] lexical_cast<uint_value_t<10>::least>("7") = 55
From: Nevin Liber (nevin_at_[hidden])
Date: 2011-12-05 17:32:54


On 5 December 2011 15:47, Nathan Ridge <zeratul976_at_[hidden]> wrote:
>
>> Whoops! uint_value_t<10>::least is unsigned char...
>>
>> Can something be done about this, like having uint_value_t<10>::least
>> be something that looks and acts like an unsigned char but is recognized
>> by lexical_cast to be an integer type, not a character type?
>
> Any thoughts?

Massage it yourself, such as (warning: never compiled):

boost::mpl::if_c< 1 == sizeof(uint_value_t<10>::least), YourType,
uint_value_t<10>::least>::type

Where YourType has the properties that you want.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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