3 Forward declares `boost::hana::union_`.
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_UNION_HPP
11 #define BOOST_HANA_FWD_UNION_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns the union of two sets.
19 //! @relates hana::set
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:
25 //! x ^in^ union_(xs, ys) if and only if x ^in^ xs || x ^in^ ys
30 //! Two sets to compute the union of.
35 //! @include example/union.cpp
36 #ifdef BOOST_HANA_DOXYGEN_INVOKED
37 constexpr auto union_ = [](auto&& xs, auto&& ys) {
38 return tag-dispatched;
41 template <typename S, typename = void>
42 struct union_impl : union_impl<S, when<true>> { };
45 template <typename Xs, typename Ys>
46 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
49 constexpr union_t union_{};
51 BOOST_HANA_NAMESPACE_END
53 #endif // !BOOST_HANA_FWD_UNION_HPP