File indexing completed on 2025-12-15 09:53:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_HANA_FWD_TAKE_FRONT_HPP
0011 #define BOOST_HANA_FWD_TAKE_FRONT_HPP
0012
0013 #include <boost/hana/config.hpp>
0014 #include <boost/hana/core/when.hpp>
0015
0016 #include <cstddef>
0017
0018
0019 namespace boost { namespace hana {
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0042 constexpr auto take_front = [](auto&& xs, auto const& n) {
0043 return tag-dispatched;
0044 };
0045 #else
0046 template <typename S, typename = void>
0047 struct take_front_impl : take_front_impl<S, when<true>> { };
0048
0049 struct take_front_t {
0050 template <typename Xs, typename N>
0051 constexpr auto operator()(Xs&& xs, N const& n) const;
0052 };
0053
0054 BOOST_HANA_INLINE_VARIABLE constexpr take_front_t take_front{};
0055 #endif
0056
0057
0058
0059
0060
0061
0062
0063
0064 #ifdef BOOST_HANA_DOXYGEN_INVOKED
0065 template <std::size_t n>
0066 constexpr auto take_front_c = [](auto&& xs) {
0067 return hana::take_front(forwarded(xs), hana::size_c<n>);
0068 };
0069 #else
0070 template <std::size_t n>
0071 struct take_front_c_t;
0072
0073 template <std::size_t n>
0074 BOOST_HANA_INLINE_VARIABLE constexpr take_front_c_t<n> take_front_c{};
0075 #endif
0076 }}
0077
0078 #endif