Boost logo

Boost :

Subject: Re: [boost] [convert] Default Syntax Idea
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2009-02-25 09:14:24


Eric MALENFANT a écrit :
> boost-bounces_at_[hidden] wrote:
>
>> Now I am not so sure. In isolation it looks good:
>>
>> int j = convert_to<int>(s) | 5;
>>
>> What happens when we start mixing with
>>
>> int j = convert_to<int>(s) | 5 >> std::hex;
>> int j = convert_to<int>(s) | 5 >> boost::dothow >> std::hex; or
>> even int j = convert_to<int>(s) >> boost::dothow >> std::hex | 5;
>>
>
> To add to the "I am not sure" side: What if I want to perform a
> bitwise-or on the result of convert_to<int>
What about being on the safe side with :

int j = convert_to<int>(s) | default_(5);

??

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk