3 Forward declares `boost::hana::reverse`.
5 @copyright Louis Dionne 2013-2016
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_REVERSE_HPP
11 #define BOOST_HANA_FWD_REVERSE_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 BOOST_HANA_NAMESPACE_BEGIN
18 //! Reverse a sequence.
19 //! @ingroup group-Sequence
21 //! Specifically, `reverse(xs)` is a new sequence containing the same
22 //! elements as `xs`, except in reverse order.
26 //! The sequence to reverse.
31 //! @include example/reverse.cpp
32 #ifdef BOOST_HANA_DOXYGEN_INVOKED
33 constexpr auto reverse = [](auto&& xs) {
34 return tag-dispatched;
37 template <typename S, typename = void>
38 struct reverse_impl : reverse_impl<S, when<true>> { };
41 template <typename Xs>
42 constexpr auto operator()(Xs&& xs) const;
45 constexpr reverse_t reverse{};
47 BOOST_HANA_NAMESPACE_END
49 #endif // !BOOST_HANA_FWD_REVERSE_HPP