1//// 2Copyright 2017 Peter Dimov 3 4Distributed under the Boost Software License, Version 1.0. 5 6See accompanying file LICENSE_1_0.txt or copy at 7http://www.boost.org/LICENSE_1_0.txt 8//// 9 10[#set] 11# Set Operations, <boost/mp11/set.hpp> 12:toc: 13:toc-title: 14:idprefix: 15 16A set is a list whose elements are unique. 17 18## mp_is_set<S> 19 20 template<class S> using mp_is_set = /*...*/; 21 22`mp_is_set<S>` is `mp_true` if `S` is a set, `mp_false` otherwise. 23 24## mp_set_contains<S, V> 25 26 template<class S, class V> using mp_set_contains = /*...*/; 27 28`mp_set_contains<S, V>` is `mp_true` if the type `V` is an element of the set `S`, `mp_false` otherwise. 29 30## mp_set_push_back<S, T...> 31 32 template<class S, class... T> using mp_set_push_back = /*...*/; 33 34For each `T1` in `T...`, `mp_set_push_back<S, T...>` appends `T1` to the end of the set `S` if it's not already an element of `S`. 35 36## mp_set_push_front<S, T...> 37 38 template<class S, class... T> using mp_set_push_front = /*...*/; 39 40`mp_set_push_front<S, T...>` inserts at the front of the set `S` those elements of `T...` for which `S` does not already contain the same type. 41 42## mp_set_union<L...> 43 44 template<class... L> using mp_set_union = /*...*/; 45 46`mp_set_union<S, L...>` is `mp_set_push_back<S, T...>`, where `T...` are the combined elements of the lists `L...`. 47`mp_set_union<>` is `mp_list<>`. 48 49## mp_set_intersection<S...> 50 51 template<class... S> using mp_set_intersection = /*...*/; 52 53`mp_set_intersection<S...>` returns a set that contains the elements that occur in all of the sets `S...`. 54`mp_set_intersection<>` is `mp_list<>`. 55 56## mp_set_difference<L, S...> 57 58 template<class L, class... S> using mp_set_difference = /*...*/; 59 60`mp_set_difference<L, S...>` removes the elements of the list `L` that appear in any of the sets `S...` and 61returns the result. 62