On 03/17/2017 03:06 PM, Peter Dimov via Boost wrote:
https://github.com/pdimov/mp11/
A few comments...
Most algorithms take the typelist as the first argument, but others
do not, e.g. mp_transform. If possible, I would like to see
all algorithms take typelist as the first argument. It looks like the
current order is dictated by the requirements of mp_tranform_impl.
Would it be possible to swap the types where the algorithm is
declared? For example:
template class F> using mp_transform =
typename detail::mp_transform_impl::type;
Apropos mp_transform, would it be possible to extend it such that we
can pass a type-trait directly to it? For example:
using const_list = mp_transform;
instead of using std::add_const_t. The reason I ask is that I have
lots of my own domain-specific type-traits that does not come with
a _t version, so this is mainly for convenience.
The reference documentation is a bit terse and obscure. For example, the
documentation for mp_find tells us in a convoluted way that it returns
the index of a type in a typelist. It could also mention that it is
the dual algorithm to mp_at, which returns a type at an index in a
typelist.