]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/hana/include/boost/hana/fwd/symmetric_difference.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / symmetric_difference.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Forward declares `boost::hana::symmetric_difference`.
4
5@copyright Louis Dionne 2013-2016
6Distributed under the Boost Software License, Version 1.0.
7(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 */
9
10#ifndef BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP
11#define BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP
12
13#include <boost/hana/config.hpp>
14#include <boost/hana/core/when.hpp>
15
16
17BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns the symmetric set-theoretic difference of two sets.
19 //! @relates hana::set
20 //!
21 //! Given two sets `xs` and `ys`, `symmetric_difference(xs, ys)` is a new
22 //! set containing all the elements of `xs` that are not contained in `ys`,
23 //! and all the elements of `ys` that are not contained in `xs`. The
24 //! symmetric difference of two sets satisfies the following:
25 //! @code
26 //! symmetric_difference(xs, ys) == union_(difference(xs, ys), difference(ys, xs))
27 //! @endcode
28 //!
29 //!
30 //! @param xs, ys
31 //! Two sets to compute the symmetric difference of.
32 //!
33 //!
34 //! Example
35 //! -------
36 //! @include example/symmetric_difference.cpp
37#ifdef BOOST_HANA_DOXYGEN_INVOKED
38 constexpr auto symmetric_difference = [](auto&& xs, auto&& ys) {
39 return tag-dispatched;
40 };
41#else
42 template <typename S, typename = void>
43 struct symmetric_difference_impl : symmetric_difference_impl<S, when<true>> { };
44
45 struct symmetric_difference_t {
46 template <typename Xs, typename Ys>
47 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
48 };
49
50 constexpr symmetric_difference_t symmetric_difference{};
51#endif
52BOOST_HANA_NAMESPACE_END
53
54#endif // !BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP