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::or_`.
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_OR_HPP
0011 #define BOOST_HANA_FWD_OR_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 any of the arguments is true-valued.
0019     //! @ingroup group-Logical
0020     //!
0021     //! `or_` can be called with one argument or more. When called with
0022     //! two arguments, `or_` uses tag-dispatching to find the right
0023     //! implementation. Otherwise,
0024     //! @code
0025     //!     or_(x) == x
0026     //!     or_(x, y, ...z) == or_(or_(x, y), z...)
0027     //! @endcode
0028     //!
0029     //!
0030     //! Example
0031     //! -------
0032     //! @include example/or.cpp
0033 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0034     constexpr auto or_ = [](auto&& x, auto&& ...y) -> decltype(auto) {
0035         return tag-dispatched;
0036     };
0037 #else
0038     template <typename L, typename = void>
0039     struct or_impl : or_impl<L, when<true>> { };
0040 
0041     struct or_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 or_t or_{};
0050 #endif
0051 }} // end namespace boost::hana
0052 
0053 #endif // !BOOST_HANA_FWD_OR_HPP