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`.
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_HPP
0011 #define BOOST_HANA_FWD_NONE_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 all of the keys of the structure are false-valued.
0019     //! @ingroup group-Searchable
0020     //!
0021     //! The keys of the structure must be `Logical`s. If the structure is not
0022     //! finite, a true-valued key must appear at a finite "index" in order
0023     //! for this method to finish.
0024     //!
0025     //!
0026     //! Example
0027     //! -------
0028     //! @include example/none.cpp
0029 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0030     constexpr auto none = [](auto&& xs) -> decltype(auto) {
0031         return tag-dispatched;
0032     };
0033 #else
0034     template <typename S, typename = void>
0035     struct none_impl : none_impl<S, when<true>> { };
0036 
0037     struct none_t {
0038         template <typename Xs>
0039         constexpr auto operator()(Xs&& xs) const;
0040     };
0041 
0042     BOOST_HANA_INLINE_VARIABLE constexpr none_t none{};
0043 #endif
0044 }} // end namespace boost::hana
0045 
0046 #endif // !BOOST_HANA_FWD_NONE_HPP