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