]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/include/boost/hana/fwd/union.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / union.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::union_`.
4
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)
8 */
9
10 #ifndef BOOST_HANA_FWD_UNION_HPP
11 #define BOOST_HANA_FWD_UNION_HPP
12
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
15
16
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns the union of two sets.
19 //! @relates hana::set
20 //!
21 //! Given two sets `xs` and `ys`, `union_(xs, ys)` is a new set containing
22 //! all the elements of `xs` and all the elements of `ys`, without
23 //! duplicates. For any object `x`, the following holds:
24 //! @code
25 //! x ^in^ union_(xs, ys) if and only if x ^in^ xs || x ^in^ ys
26 //! @endcode
27 //!
28 //!
29 //! @param xs, ys
30 //! Two sets to compute the union of.
31 //!
32 //!
33 //! Example
34 //! -------
35 //! @include example/union.cpp
36 #ifdef BOOST_HANA_DOXYGEN_INVOKED
37 constexpr auto union_ = [](auto&& xs, auto&& ys) {
38 return tag-dispatched;
39 };
40 #else
41 template <typename S, typename = void>
42 struct union_impl : union_impl<S, when<true>> { };
43
44 struct union_t {
45 template <typename Xs, typename Ys>
46 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
47 };
48
49 constexpr union_t union_{};
50 #endif
51 BOOST_HANA_NAMESPACE_END
52
53 #endif // !BOOST_HANA_FWD_UNION_HPP