//// Copyright 2017 Peter Dimov Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt //// [#set] # Set Operations, :toc: :toc-title: :idprefix: A set is a list whose elements are unique. ## mp_is_set template using mp_is_set = /*...*/; `mp_is_set` is `mp_true` if `S` is a set, `mp_false` otherwise. ## mp_set_contains template using mp_set_contains = /*...*/; `mp_set_contains` is `mp_true` if the type `V` is an element of the set `S`, `mp_false` otherwise. ## mp_set_push_back template using mp_set_push_back = /*...*/; For each `T1` in `T...`, `mp_set_push_back` appends `T1` to the end of the set `S` if it's not already an element of `S`. ## mp_set_push_front template using mp_set_push_front = /*...*/; `mp_set_push_front` inserts at the front of the set `S` those elements of `T...` for which `S` does not already contain the same type. ## mp_set_union template using mp_set_union = /*...*/; `mp_set_union` is `mp_set_push_back`, where `T...` are the combined elements of the lists `L...`. `mp_set_union<>` is `mp_list<>`. ## mp_set_intersection template using mp_set_intersection = /*...*/; `mp_set_intersection` returns a set that contains the elements that occur in all of the sets `S...`. `mp_set_intersection<>` is `mp_list<>`. ## mp_set_difference template using mp_set_difference = /*...*/; `mp_set_difference` removes the elements of the list `L` that appear in any of the sets `S...` and returns the result.