3 Forward declares `boost::hana::symmetric_difference`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP
11 #define BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns the symmetric set-theoretic difference of two sets.
19 //! @relates hana::set
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:
26 //! symmetric_difference(xs, ys) == union_(difference(xs, ys), difference(ys, xs))
31 //! Two sets to compute the symmetric difference of.
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;
42 template <typename S, typename = void>
43 struct symmetric_difference_impl : symmetric_difference_impl<S, when<true>> { };
45 struct symmetric_difference_t {
46 template <typename Xs, typename Ys>
47 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
50 constexpr symmetric_difference_t symmetric_difference{};
52 BOOST_HANA_NAMESPACE_END
54 #endif // !BOOST_HANA_FWD_SYMMETRIC_DIFFERENCE_HPP