Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*!
0002 @file
0003 Forward declares `boost::hana::and_`.
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_AND_HPP
0011 #define BOOST_HANA_FWD_AND_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Return whether all the arguments are true-valued.
0019     //! @ingroup group-Logical
0020     //!
0021     //! `and_` can be called with one argument or more. When called with
0022     //! two arguments, `and_` uses tag-dispatching to find the right
0023     //! implementation. Otherwise,
0024     //! @code
0025     //!     and_(x) == x
0026     //!     and_(x, y, ...z) == and_(and_(x, y), z...)
0027     //! @endcode
0028     //!
0029     //!
0030     //! Example
0031     //! -------
0032     //! @include example/and.cpp
0033 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0034     constexpr auto and_ = [](auto&& x, auto&& ...y) -> decltype(auto) {
0035         return tag-dispatched;
0036     };
0037 #else
0038     template <typename L, typename = void>
0039     struct and_impl : and_impl<L, when<true>> { };
0040 
0041     struct and_t {
0042         template <typename X, typename Y>
0043         constexpr decltype(auto) operator()(X&& x, Y&& y) const;
0044 
0045         template <typename X, typename ...Y>
0046         constexpr decltype(auto) operator()(X&& x, Y&& ...y) const;
0047     };
0048 
0049     BOOST_HANA_INLINE_VARIABLE constexpr and_t and_{};
0050 #endif
0051 }} // end namespace boost::hana
0052 
0053 #endif // !BOOST_HANA_FWD_AND_HPP