Boost logo

Boost :

Subject: Re: [boost] [review][mp11] Formal review of Mp11
From: Peter Dimov (lists_at_[hidden])
Date: 2017-07-16 23:52:55


> > https://github.com/joaquintides/multi_index_mp11/commit/91f2b32cf5a27b3aeaaf6ceb42959c677410f490

> template<typename TagList> struct no_duplicate_tags { typedef
> mp11::mp_fold< TagList, mp11::mp_list<>, mp11::mp_set_push_back > aux;

This is mp_unique<TagList>, but...

> BOOST_STATIC_CONSTANT(
> bool,value=(mp11::mp_size<TagList>::value==mp11::mp_size<aux>::value)); };

... this in its entirety is what Metal calls "distinct", the counterpart to
mp_same<T...> that returns true not when all Ts are the same, but when all
Ts are distinct.

A good argument for adding mp_distinct (or the equivalent list-based
formulation mp_is_set), I suppose.


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