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::max`.
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_MAX_HPP
0011 #define BOOST_HANA_FWD_MAX_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Returns the greatest of its arguments according to the `less` ordering.
0019     //! @ingroup group-Orderable
0020     //!
0021     //!
0022     //! @todo Can't specify the signature here either. See `min` for details.
0023     //!
0024     //! Example
0025     //! -------
0026     //! @include example/max.cpp
0027 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0028     constexpr auto max = [](auto&& x, auto&& y) -> decltype(auto) {
0029         return tag-dispatched;
0030     };
0031 #else
0032     template <typename T, typename U, typename = void>
0033     struct max_impl : max_impl<T, U, when<true>> { };
0034 
0035     struct max_t {
0036         template <typename X, typename Y>
0037         constexpr decltype(auto) operator()(X&& x, Y&& y) const;
0038     };
0039 
0040     BOOST_HANA_INLINE_VARIABLE constexpr max_t max{};
0041 #endif
0042 }} // end namespace boost::hana
0043 
0044 #endif // !BOOST_HANA_FWD_MAX_HPP