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