]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/hana/fwd/none_of.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / hana / fwd / none_of.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Forward declares `boost::hana::none_of`.
4
b32b8144 5@copyright Louis Dionne 2013-2017
7c673cae
FG
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_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
1e59de90 17namespace boost { namespace hana {
7c673cae
FG
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
1e59de90 51 BOOST_HANA_INLINE_VARIABLE constexpr none_of_t none_of{};
7c673cae 52#endif
1e59de90 53}} // end namespace boost::hana
7c673cae
FG
54
55#endif // !BOOST_HANA_FWD_NONE_OF_HPP