3 Forward declares `boost::hana::any_of`.
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_ANY_OF_HPP
11 #define BOOST_HANA_FWD_ANY_OF_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Returns whether any key of the structure satisfies the `predicate`.
19 //! @ingroup group-Searchable
21 //! If the structure is not finite, `predicate` has to be satisfied
22 //! after looking at a finite number of keys for this method to finish.
26 //! The structure to search.
29 //! A function called as `predicate(k)`, where `k` is a key of the
30 //! structure, and returning a `Logical`.
35 //! @include example/any_of.cpp
36 #ifdef BOOST_HANA_DOXYGEN_INVOKED
37 constexpr auto any_of = [](auto&& xs, auto&& predicate) {
38 return tag-dispatched;
41 template <typename S, typename = void>
42 struct any_of_impl : any_of_impl<S, when<true>> { };
45 template <typename Xs, typename Pred>
46 constexpr auto operator()(Xs&& xs, Pred&& pred) const;
49 constexpr any_of_t any_of{};
51 BOOST_HANA_NAMESPACE_END
53 #endif // !BOOST_HANA_FWD_ANY_OF_HPP