]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/hana/fwd/is_disjoint.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / hana / fwd / is_disjoint.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::is_disjoint`.
4
5 @copyright Louis Dionne 2013-2017
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_IS_DISJOINT_HPP
11 #define BOOST_HANA_FWD_IS_DISJOINT_HPP
12
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
15
16
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns whether two `Searchable`s are disjoint.
19 //! @ingroup group-Searchable
20 //!
21 //! Given two `Searchable`s `xs` and `ys`, `is_disjoint` returns a
22 //! `Logical` representing whether the keys in `xs` are disjoint from
23 //! the keys in `ys`, i.e. whether both structures have no keys in common.
24 //!
25 //!
26 //! @param xs, ys
27 //! Two `Searchable`s to test for disjointness.
28 //!
29 //!
30 //! Example
31 //! -------
32 //! @include example/is_disjoint.cpp
33 #ifdef BOOST_HANA_DOXYGEN_INVOKED
34 constexpr auto is_disjoint = [](auto const& xs, auto const& ys) {
35 return tag-dispatched;
36 };
37 #else
38 template <typename S1, typename S2, typename = void>
39 struct is_disjoint_impl : is_disjoint_impl<S1, S2, when<true>> { };
40
41 struct is_disjoint_t {
42 template <typename Xs, typename Ys>
43 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
44 };
45
46 constexpr is_disjoint_t is_disjoint{};
47 #endif
48 BOOST_HANA_NAMESPACE_END
49
50 #endif // !BOOST_HANA_FWD_IS_DISJOINT_HPP