
1 Nov
2011
1 Nov
'11
11:05 p.m.
On Tue, Nov 1, 2011 at 11:32 PM, Marshall Clow <mclow.lists@gmail.com> wrote:
std::string input ( "61626f6465" ); std::string result; unhex ( input.begin(), input.end (), std::back_inserter(result));
---> result should contain "abode"
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. -- Olaf