Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*!
0002 @file
0003 Forward declares `boost::hana::reverse`.
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_REVERSE_HPP
0011 #define BOOST_HANA_FWD_REVERSE_HPP
0012 
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015 
0016 
0017 namespace boost { namespace hana {
0018     //! Reverse a sequence.
0019     //! @ingroup group-Sequence
0020     //!
0021     //! Specifically, `reverse(xs)` is a new sequence containing the same
0022     //! elements as `xs`, except in reverse order.
0023     //!
0024     //!
0025     //! @param xs
0026     //! The sequence to reverse.
0027     //!
0028     //!
0029     //! Example
0030     //! -------
0031     //! @include example/reverse.cpp
0032 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0033     constexpr auto reverse = [](auto&& xs) {
0034         return tag-dispatched;
0035     };
0036 #else
0037     template <typename S, typename = void>
0038     struct reverse_impl : reverse_impl<S, when<true>> { };
0039 
0040     struct reverse_t {
0041         template <typename Xs>
0042         constexpr auto operator()(Xs&& xs) const;
0043     };
0044 
0045     BOOST_HANA_INLINE_VARIABLE constexpr reverse_t reverse{};
0046 #endif
0047 }} // end namespace boost::hana
0048 
0049 #endif // !BOOST_HANA_FWD_REVERSE_HPP