| | #ifndef METAL_LAMBDA_ARG_HPP |
| | #define METAL_LAMBDA_ARG_HPP |
| |
|
| | #include "../config.hpp" |
| |
|
| | #include <cstddef> |
| |
|
| | namespace metal { |
| | |
| | namespace detail { |
| | template <std::size_t n> |
| | struct _arg; |
| | } |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | template <std::size_t n> |
| | using arg = typename detail::_arg<n>::type; |
| | } |
| |
|
| | #include "../lambda/lambda.hpp" |
| | #include "../list/at.hpp" |
| | #include "../list/list.hpp" |
| | #include "../number/number.hpp" |
| |
|
| | namespace metal { |
| | |
| | namespace detail { |
| | template <std::size_t n> |
| | struct _arg { |
| | template <class... vals> |
| | using impl = at<list<vals...>, number<n - 1>>; |
| |
|
| | using type = lambda<impl>; |
| | }; |
| |
|
| | template <> |
| | struct _arg<0U> { |
| | }; |
| | } |
| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | using _1 = metal::arg<1U>; |
| | using _2 = metal::arg<2U>; |
| | using _3 = metal::arg<3U>; |
| | using _4 = metal::arg<4U>; |
| | using _5 = metal::arg<5U>; |
| | using _6 = metal::arg<6U>; |
| | using _7 = metal::arg<7U>; |
| | using _8 = metal::arg<8U>; |
| | using _9 = metal::arg<9U>; |
| | |
| | } |
| |
|
| | #endif |
| |
|