diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:12:59 +0900 |
commit | b8cf34c691623e4ec329053cbbf68522a855882d (patch) | |
tree | 34da08632a99677f6b79ecb65e5b655a5b69a67f /boost/hana/fwd/take_back.hpp | |
parent | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (diff) | |
download | boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.gz boost-b8cf34c691623e4ec329053cbbf68522a855882d.tar.bz2 boost-b8cf34c691623e4ec329053cbbf68522a855882d.zip |
Imported Upstream version 1.67.0upstream/1.67.0
Diffstat (limited to 'boost/hana/fwd/take_back.hpp')
-rw-r--r-- | boost/hana/fwd/take_back.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/boost/hana/fwd/take_back.hpp b/boost/hana/fwd/take_back.hpp index fa4dde5e3c..5ba1cf932f 100644 --- a/boost/hana/fwd/take_back.hpp +++ b/boost/hana/fwd/take_back.hpp @@ -53,6 +53,26 @@ BOOST_HANA_NAMESPACE_BEGIN constexpr take_back_t take_back{}; #endif + + //! Equivalent to `take_back`; provided for convenience. + //! @ingroup group-Sequence + //! + //! + //! Example + //! ------- + //! @include example/take_back_c.cpp +#ifdef BOOST_HANA_DOXYGEN_INVOKED + template <std::size_t n> + constexpr auto take_back_c = [](auto&& xs) { + return hana::take_back(forwarded(xs), hana::size_c<n>); + }; +#else + template <std::size_t n> + struct take_back_c_t; + + template <std::size_t n> + constexpr take_back_c_t<n> take_back_c{}; +#endif BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_FWD_TAKE_BACK_HPP |