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::less_equal`.
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_LESS_EQUAL_HPP
0011 #define BOOST_HANA_FWD_LESS_EQUAL_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 #include <boost/hana/detail/nested_than_fwd.hpp>
0016 
0017 
0018 namespace boost { namespace hana {
0019     //! Returns a `Logical` representing whether `x` is less than or
0020     //! equal to `y`.
0021     //! @ingroup group-Orderable
0022     //!
0023     //!
0024     //! Signature
0025     //! ---------
0026     //! Given a Logical `Bool` and two Orderables `A` and `B` with a common
0027     //! embedding, the signature is
0028     //! @f$ \mathrm{less\_equal} : A \times B \to Bool @f$.
0029     //!
0030     //! @param x, y
0031     //! Two objects to compare.
0032     //!
0033     //!
0034     //! Example
0035     //! -------
0036     //! @include example/less_equal.cpp
0037 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0038     constexpr auto less_equal = [](auto&& x, auto&& y) {
0039         return tag-dispatched;
0040     };
0041 #else
0042     template <typename T, typename U, typename = void>
0043     struct less_equal_impl : less_equal_impl<T, U, when<true>> { };
0044 
0045     struct less_equal_t : detail::nested_than<less_equal_t> {
0046         template <typename X, typename Y>
0047         constexpr auto operator()(X&& x, Y&& y) const;
0048     };
0049 
0050     BOOST_HANA_INLINE_VARIABLE constexpr less_equal_t less_equal{};
0051 #endif
0052 }} // end namespace boost::hana
0053 
0054 #endif // !BOOST_HANA_FWD_LESS_EQUAL_HPP