Subject: Re: [boost] hex/unhex()?
From: Jeroen Habraken (vexocide_at_[hidden])
Date: 2011-11-01 19:20:50
On 2 November 2011 00:05, Olaf van der Spek <ml_at_[hidden]> wrote:
> On Tue, Nov 1, 2011 at 11:32 PM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
>> Â Â Â Â std::string input ( "61626f6465" );
>> Â Â Â Â std::string result;
>> Â Â Â Â unhex ( input.begin(), input.end (), std::back_inserter(result));
>> Â Â Â Â ---> result should contain "abode"
I seem to have misinterpreted your initial request (I thought you were
taking about parsing / generating hexadecimal numbers), what's
described above isn't supported my boost.coerce, sorry.
> That one does not return std::string. It's also sub-optimal.
>>> How would your unhex() flag an error?
>> Throw an exception.
> Hmm. I'd like to see a non-throwing variant as well.
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk