Boost logo

Boost :

Subject: Re: [boost] [review][mp11] Reminder of ongoing formal review
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-07-24 23:42:14


On 7/21/2017 11:36 AM, Bjorn Reese via Boost wrote:
> The formal review of Mp11 continues until (and including) Monday, July
> 24th.
>
> There have been four formal reviews so far.
>
> I would like to ask the Boost community for two favours:
>
> 1. Please postpone the discussions about CMake and the future
> directions of Boost until the formal review has ended.
>
> 2. Please review the Mp11 library instead.
>
> If you disagree with any of the above, please contact me off-list.
>
> Here is the call for review once more:
>
> The formal review of Peter Dimov's Mp11 library is scheduled for
> July 15 - July 24, 2017 [1].
>
> Mp11 is a C++11 metaprogramming library for compile-time manipulation of
> data structures that contain types. It’s based on template aliases and
> variadic templates and implements the approach outlined in the article
> "Simple C++ metaprogramming" [2] and its sequel [3]. These articles are
> useful background information for the review.
>
> * Mp11 aims to make simple usage simple, and to support complex usage
> without complicating the simple use cases.
>
> * Mp11 works on any type-list, whether its own type-list mp_list,
> or standard type-lists such as std::tuple and std::variant, or
> user-defined type-lists.
>
> * Mp11 works with any meta-function, such as C++11 or Boost
> type-traits, or user-defined type-traits.
>
> Mp11 can be found here:
>
> * Documentation:
> https://rawgit.com/pdimov/mp11/master/doc/html/mp11.html
>
> * Source code: https://github.com/pdimov/mp11/tree/master
>
>
> Please answer the following questions in your review [4]:
>
> 1. Should Mp11 be accepted into Boost? Please state all conditions
> for acceptance explicity.

YES. It is good enough currently to be accepted.

>
> 2. What is your evaluation of the design?

The design based on parameter packs and template aliases moves TMP, as
specified by MPL library idioms, into the C++11 world. The library does
not attempt to be as revolutionary as Hana but it offers an easier path
to the many who have used MPL under C++03.

>
> 3. What is your evaluation of the implementation?

I did not look at it.

>
> 4. What is your evaluation of the documentation?

I think the formal Overview and Definitions were presented properly.
Obviously the two introductory papers mentioned in the Overview are
excellent but the details of those papers will probably be daunting to
many C++ programmers. I would suggest that the first topic of the first
paper, "C++11 changes the playing field" up until "Type lists and
mp_rename" be included directly in the mp11 docs as a separate topic,
perhaps under the title "MPL versus mp11". I realize that this creates a
redundancy in the doc, but I feel that those explanations explain more
to the TMP programmer having used MPL and attempting to understand how
TMP might be used with C++11 constructs, than anything else, and so need
to be in the main document where it is immediately noticeable. The rest
of the documentation, especially the specifically correct terseness of
the reference, then falls into place much more easily.

The only other thing in the documentation which I might criticize was
the arrangement of functionality in the reference. I think all sub-topic
functionality should be in alphabetic order in the left panel of the
doc. I actually missed the indexing functionality of a list, which I
thought must be there, because the mp_at_c/mp_at was not in the
alphabetic sequence in the left panel I might expect.

>
> 5. What is your evaluation of the potential usefulness of the library?

It is obviously useful as a much easier syntactical way of create
complex templates using C++11 and beyond. The MPL library was and is an
immense achievement. Moving to c++11 other TMP idioms are needed and
there is plenty of room for alternatives. So I have no problem with mp11
and hana coexisting as advances and alternatives.

>
> 6. Did you try to use the library? With what compiler? Did you have
> any problems?

I ran the tests in the test directory with gcc-7.1 in c++11 mode,
msvc-14.1 in c++14 mode which is its lowest mode, and clang-4.0 in c++11
mode. All tests passed. I could have tried numerous other previous
releases of these compilers in c++11 mode but I was satisfied that if
the latest versions of those compilers worked flawlessly, the library
worked correctly and any previous version failures which might occur
would be the result of the compiler and not mp11.

>
> 7. How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?

A few hours at the end after spending an hour here and there acquainting
myself both the mp11 and C++11 advances which I did not know as
completely as I should have.

>
> 8. Are you knowledgeable about the problem domain?

I am decently knowledgeable and have used MPL and understand it pretty well.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk