lexical_cast<uint_value_t<10>::least>("7") = 55

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?

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? Nate

On 5 December 2011 15:47, Nathan Ridge
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@eviloverlord.com (847) 691-1404
participants (2)
-
Nathan Ridge
-
Nevin Liber