Boost logo

Boost :

Subject: Re: [boost] [metaparse] Review period starts May 25th and ends June 7th - ongoing
From: Roland Bock (rbock_at_[hidden])
Date: 2015-06-08 02:02:23

On 2015-05-28 15:12, Christophe Henry wrote:
> Dear all,
> The review of the metaparse library started last Monday.
> Please consider taking the time to review it and post comments or reviews
> on this list.
> Thanks,
> Christophe
> ------------------------------------------------------------------------------------------
> Please always include in your review a vote as to whether the library
> should be accepted into Boost.
> Additionally please consider giving feedback on the following general
> topics:
> - What is your evaluation of the design?
> - What is your evaluation of the implementation?
Nicely structured and readable, as far as I can tell.

I believe that there is still room for improvement regarding the error
messages in case of a parse error. I described the idea of a portable
static_assert in my talk at MeetingC++ in Berlin last year: For each
potential problem (i.e. for each of the BOOST_STATIC_ASSERTs that you
now have), define a struct with a static method that fires a
static_assert when called. In case of an error, transport this class
from the problem-location to the TMP-call-site and call that static
method. This way you can produce a very targeted message with a very
short TMP call stack.

Haven't looked deep enough to say if this pattern is actually applicable.

> - What is your evaluation of the documentation?
Very readable, nicely organized.
> - What is your evaluation of the potential usefulness of the library?
Now that is an interesting question. Given the current compile times, I
have no idea how it will be used in practice, but I am sure it will.

More importantly though, it is an excellent show case of what is
possible given enough perseverance. Also, it might spur development in
the core language towards features that might make such a library easier
to write (and faster to compile).

Part of the role of boost is to push compilers to the limit (and
sometimes beyond). This library certainly has the capabilities to do so.
> - Did you try to use the library?
> - With what compiler?
> - Did you have any problems?
I tried a few of the examples in
using clang-3.5.1 -std=c++11.

The only problem I encountered was in example/parsing_error. It did not
produce an error at first. I had to remove a comment. It turned out
there was a spelling error in the comment leading to a compile error
that was not intended, I guess. After fixing that, I think I saw the
intended error message which I found a bit hard to grok.

I was a bit surprised to see BOOST_STATIC_ASSERT in a C++11 environment.
> - How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?
A quick reading of the documentation and bits of the code, plus some
experiments with the tests provided.

Tempus fugit...
> - Are you knowledgeable about the problem domain?
As author of sqlpp11 I believe to have some grasp on DSLs. Also I did
quite a few experiments on turning strings into templates. But I am
certainly not a parser specialist.



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