Boost logo

Boost :

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


On Wed, Feb 29, 2012 at 12:19 AM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> On Nov 1, 2011, at 1:09 PM, Olaf van der Spek wrote:
>>
>> Does Boost have hex/unhex() that support std::string?
>> I can't find them and I think they'd be quite handy to have.
>
> Committed in revision 77138

Thanks. Got some questions though:
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.

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

Shouldn't hex_decode_error derive from std::runtime_error?

Wouldn't it be simpler to only provide the range-based variant and
require C strings and iterator pairs to be wrapped in a range?

-- 
Olaf

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