Subject: Re: [boost] [review][mp11] Formal review of Mp11
From: Peter Dimov (lists_at_[hidden])
Date: 2017-07-20 00:22:06
Brook Milligan wrote:
> > 1. Should Mp11 be accepted into Boost? Please state all conditions for
> > acceptance explicitly.
> I feel Mp11 should definitely be accepted.
Zach Laine wrote:
> This is one of the things with which I'm struggling when considering the
> use of mp11, or Brigand, or any of the other recent offerings out there.
> I've found TMP so *easy* in 11 and later, that I've entirely stop using a
> library to do it. I'm trying to understand why anyone would -- that's not
> my making an argument, just failure of imagination. :)
It gets really easy in 17 and later, as you no longer need mp_all because of
fold expressions and there are all kinds of ad-hoc primitives in the
standard library so you can get by. So for instance if you have a pack T...
you can check if all those types are const (toy example) by doing
(std::is_const_v<T> && ...), instead of mp_all<std::is_const_t<T>...> or
gathering the types into an mp_list<T...> L and then using mp_all_of<L,
But even then, mp_unique or mp_remove(_if) are no fun to write by hand.
In short, if what you want to do is not a simple pack expansion, you
probably want to use the library. That, or reimplement it. :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk