3 Forward declares `boost::hana::is_disjoint`.
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_IS_DISJOINT_HPP
11 #define BOOST_HANA_FWD_IS_DISJOINT_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns whether two `Searchable`s are disjoint.
19 //! @ingroup group-Searchable
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.
27 //! Two `Searchable`s to test for disjointness.
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;
38 template <typename S1, typename S2, typename = void>
39 struct is_disjoint_impl : is_disjoint_impl<S1, S2, when<true>> { };
41 struct is_disjoint_t {
42 template <typename Xs, typename Ys>
43 constexpr auto operator()(Xs&& xs, Ys&& ys) const;
46 constexpr is_disjoint_t is_disjoint{};
48 BOOST_HANA_NAMESPACE_END
50 #endif // !BOOST_HANA_FWD_IS_DISJOINT_HPP