File indexing completed on 2025-01-18 09:37:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_HANA_DETAIL_VARIADIC_AT_HPP
0011 #define BOOST_HANA_DETAIL_VARIADIC_AT_HPP
0012
0013 #include <boost/hana/config.hpp>
0014
0015 #include <cstddef>
0016 #include <utility>
0017
0018
0019 namespace boost { namespace hana { namespace detail { namespace variadic {
0020 template <std::size_t n, typename = std::make_index_sequence<n>>
0021 struct at_type;
0022
0023 template <std::size_t n, std::size_t ...ignore>
0024 struct at_type<n, std::index_sequence<ignore...>> {
0025 private:
0026 template <typename Nth>
0027 static constexpr auto go(decltype(ignore, (void*)0)..., Nth nth, ...)
0028 { return nth; }
0029
0030 public:
0031 template <typename ...Xs>
0032 constexpr auto operator()(Xs ...xs) const
0033 { return *go(&xs...); }
0034 };
0035
0036 template <std::size_t n>
0037 BOOST_HANA_INLINE_VARIABLE constexpr at_type<n> at{};
0038 }} }}
0039
0040 #endif