Boost logo

Boost :

Subject: Re: [boost] [metaparse] review
From: Abel Sinkovics (abel_at_[hidden])
Date: 2015-06-04 02:21:45

Hi Gordon,

On 2015-06-04 08:07, Gordon Woodhull wrote:
> It might be good to include opt<> (optional) in the library, or to have a short cookbook of common patterns like this, since it is not always obvious if one is doing the right thing.
I've been thinking a lot about whether I should add something like opt<>
to the library or not given that it is a common pattern in grammars. The
reason I have not done it yet was that I could not come up with a
reasonable Default value and having two arguments (the optional parser
and what to return when it is not present) didn't look simpler to me
than the one_of<, return_<>> pattern. However, given that people seem to
create opt anyway (as you did it as well) suggests that it should still
be added.


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