]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/hana/include/boost/hana/fwd/all_of.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / hana / include / boost / hana / fwd / all_of.hpp
1 /*!
2 @file
3 Forward declares `boost::hana::all_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_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
17 BOOST_HANA_NAMESPACE_BEGIN
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
50 constexpr all_of_t all_of{};
51 #endif
52 BOOST_HANA_NAMESPACE_END
53
54 #endif // !BOOST_HANA_FWD_ALL_OF_HPP