]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/include/boost/hana/fwd/none_of.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / none_of.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::none_of`.
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_NONE_OF_HPP
11 #define BOOST_HANA_FWD_NONE_OF_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 none of the keys of the structure satisfy the
19 //! `predicate`.
20 //! @ingroup group-Searchable
21 //!
22 //! If the structure is not finite, `predicate` has to return a true-
23 //! valued `Logical` after looking at a finite number of keys for this
24 //! method to finish.
25 //!
26 //!
27 //! @param xs
28 //! The structure to search.
29 //!
30 //! @param predicate
31 //! A function called as `predicate(k)`, where `k` is a key of the
32 //! structure, and returning a `Logical`.
33 //!
34 //!
35 //! Example
36 //! -------
37 //! @include example/none_of.cpp
38 #ifdef BOOST_HANA_DOXYGEN_INVOKED
39 constexpr auto none_of = [](auto&& xs, auto&& predicate) {
40 return tag-dispatched;
41 };
42 #else
43 template <typename S, typename = void>
44 struct none_of_impl : none_of_impl<S, when<true>> { };
45
46 struct none_of_t {
47 template <typename Xs, typename Pred>
48 constexpr auto operator()(Xs&& xs, Pred&& pred) const;
49 };
50
51 constexpr none_of_t none_of{};
52 #endif
53 BOOST_HANA_NAMESPACE_END
54
55 #endif // !BOOST_HANA_FWD_NONE_OF_HPP