Subject: Re: [boost] [review][mp11] Reminder of ongoing formal review
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2017-07-21 16:22:21
On Fri, Jul 21, 2017 at 10:36 AM, Bjorn Reese via Boost <
> The formal review of Peter Dimov's Mp11 library is scheduled for
> July 15 - July 24, 2017 .
> 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"  and its sequel . These articles are
> useful background information for the review.
I want to say something up front about my bias that may be useful to the
review manager. I do (and have done) a significant amount of
metaprogramming (TMP specifically). I've almost always done it in the
context of SFINAE-constraining a template or computing the return type of a
function. I've never needed a compile-time set or map. Parameter packs or
other type lists have always been sufficient for my needs, and I use those
> * Mp11 aims to make simple usage simple, and to support complex usage
> without complicating the simple use cases.
I don't need mp11 or anything like it for simple cases; among those of us
who do TMP, simple things are now (meaning in C++ >=14) trivial. It seems
to be a very nice fit for the more complex ones.
> * 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.
Both of these points are borne out by my experiments with the library, and
are great to see. The whole point of a library is code reuse, right?
> Mp11 can be found here:
> * Documentation: https://rawgit.com/pdimov/mp11
> * Source code: https://github.com/pdimov/mp11/tree/master
> Please answer the following questions in your review :
> 1. Should Mp11 be accepted into Boost? Please state all conditions
> for acceptance explicity.
Yes, I vote to accept. No conditions.
> 2. What is your evaluation of the design?
The design is very nice. I especially like the interoperability with
arbitrary type sequences and metafunctions mentioned above.
However, if the library is targeting eventual standardization, it should
either target the needs of C++ >=20 (with if constexpr and probably
concepts), or should at least have a portion of it that does, so that part
can be proposed as a standalone entity with usage experience.
3. What is your evaluation of the implementation?
It seems very straightforward and easy to follow (though I did not look at
all of it).
> 4. What is your evaluation of the documentation?
A lot of people have complained that there isn't enough of it, but I found
it to be just right. Perhaps it's a bit Spartan for non-TMP folks, but why
do they want to use it? Perhaps inlining the "Simple C++ metaprogramming"
articles would help?
Is mp11 intended to be used as a direct replacement for mpl? If so, a
brief discussion of that would be useful in the docs. Specifically, how
one might convert existing mpl-using code to use mp11.
5. What is your evaluation of the potential usefulness of the library?
For me, very low. I am convinced that others can get a lot of use out of
the more complex features, like the set and map operations.
I would also be more convinced to use it if I knew where it fit in the
6. Did you try to use the library? With what compiler? Did you have
> any problems?
Yes. I tried to use just a few of the list operations and algorithms with
Clang 4. No problems.
> 7. How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?
I read all the docs (that was fast :), and spent an hour or so playing with
> 8. Are you knowledgeable about the problem domain?