Boost logo

Boost :

Subject: Re: [boost] hex/unhex()?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-06-03 07:35:35


On Sun, Jun 3, 2012 at 7:39 AM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
>> What if input type is like range<char*> (and you'd like output type to
>> be std::string)?
>> I think output type and input type shouldn't be required to be equal.
>
> They don't have to be equal.
>        std::string s;
>        hex ( <range>, std::back_inserter (s));

But that's not as convenient as the normal function which returns the
string. It's also missing reserve().

Should hex output be upper case or lower case? c++0x suggests lower case. :p

-- 
Olaf

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