Boost logo

Boost :

Subject: Re: [boost] hex/unhex()?
From: Olaf van der Spek (ml_at_[hidden])
Date: 2011-11-02 15:25:02

On Wed, Nov 2, 2011 at 8:05 PM, Hartmut Kaiser <hartmut.kaiser_at_[hidden]> wrote:
>> On Wed, Nov 2, 2011 at 1:12 PM, Hartmut Kaiser <hartmut.kaiser_at_[hidden]>
>> wrote:
>> > As I said, I wrote nonsense with regard to your question. Sorry for
>> > the confusion.
>> When would generate() fail (return false)?
> Generate fails either if one of the used generators fail or if the
> underlying output iterator reports an error.
>> AFAIK to hex can't fail and in that case a variant that returns
>> std::string would be nicer.
> Doesn't it 'return' a std::string? If you dislike the current API a small

No, the return value is an output iterator. This forces me to use a temp var.

> wrapper function can easily handle that.


> But just to avoid confusion: what API are you looking for?
>    std::string("61626f6465") --> std::string("abode")

This one

> or rather:
>    0x61626f6465UL --> string("abode")
> (none of which can be easily done with Spirit, btw).


Boost list run by bdawes at, gregod at, cpdaniel at, john at