Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:53:04

0001 /*!
0002 @file
0003 Forward declares `boost::hana::none_of`.
0004 
0005 Copyright Louis Dionne 2013-2022
0006 Distributed under the Boost Software License, Version 1.0.
0007 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
0008  */
0009 
0010 #ifndef BOOST_HANA_FWD_NONE_OF_HPP
0011 #define BOOST_HANA_FWD_NONE_OF_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Returns whether none of the keys of the structure satisfy the
0019     //! `predicate`.
0020     //! @ingroup group-Searchable
0021     //!
0022     //! If the structure is not finite, `predicate` has to return a true-
0023     //! valued `Logical` after looking at a finite number of keys for this
0024     //! method to finish.
0025     //!
0026     //!
0027     //! @param xs
0028     //! The structure to search.
0029     //!
0030     //! @param predicate
0031     //! A function called as `predicate(k)`, where `k` is a key of the
0032     //! structure, and returning a `Logical`.
0033     //!
0034     //!
0035     //! Example
0036     //! -------
0037     //! @include example/none_of.cpp
0038 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0039     constexpr auto none_of = [](auto&& xs, auto&& predicate) {
0040         return tag-dispatched;
0041     };
0042 #else
0043     template <typename S, typename = void>
0044     struct none_of_impl : none_of_impl<S, when<true>> { };
0045 
0046     struct none_of_t {
0047         template <typename Xs, typename Pred>
0048         constexpr auto operator()(Xs&& xs, Pred&& pred) const;
0049     };
0050 
0051     BOOST_HANA_INLINE_VARIABLE constexpr none_of_t none_of{};
0052 #endif
0053 }} // end namespace boost::hana
0054 
0055 #endif // !BOOST_HANA_FWD_NONE_OF_HPP