xtd 1.0.0
Loading...
Searching...
No Matches
args.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "arg.hpp"
6
8namespace xtd {
10 namespace expressions {
41 template <size_t count>
42 struct args {
43 template <size_t index>
44 constexpr auto get() const noexcept {
45 return argument<index + 1> {};
46 }
47 };
48
50
68 inline constexpr auto _ = xtd::expressions::expression::arg<1>;
69
321 }
322}
323
325namespace std {
326 template <size_t count>
327 struct tuple_size<xtd::expressions::args<count>> : std::integral_constant<size_t, count> {};
328
329 template <size_t index, size_t count>
330 struct tuple_element<index, xtd::expressions::args<count>> {
331 using type = argument<index + 1>;
332 };
333}
334
335namespace xtd::expressions {
336 template <size_t index, size_t count>
337 constexpr auto get(xtd::expressions::args<count> const& p) noexcept {
338 return p.template get<index>();
339 }
340}
Contains xtd::expressions::arg struct.
constexpr auto _4
The xtd::expressions::_4 arg instance is fourth argument used by expression.
Definition args.hpp:169
constexpr auto _
The xtd::expressions::_ arg instance is used by expression that have only one argument.
Definition args.hpp:68
constexpr auto _5
The xtd::expressions::_5 arg instance is fifth argument used by expression.
Definition args.hpp:194
constexpr auto _10
The xtd::expressions::_10 arg instance is tenth argument used by expression.
Definition args.hpp:319
constexpr auto _2
The xtd::expressions::_2 arg instance is second argument used by expression.
Definition args.hpp:119
constexpr auto _9
The xtd::expressions::_9 arg instance is ninth argument used by expression.
Definition args.hpp:294
constexpr auto _3
The xtd::expressions::_3 arg instance is third argument used by expression.
Definition args.hpp:144
constexpr auto _7
The xtd::expressions::_7 arg instance is seventh argument used by expression.
Definition args.hpp:244
constexpr auto _8
The xtd::expressions::_8 arg instance is eighth argument used by expression.
Definition args.hpp:269
constexpr auto _6
The xtd::expressions::_6 arg instance is sixth argument used by expression.
Definition args.hpp:219
constexpr auto _1
The xtd::expressions::_1 arg instance is first argument used by expression.
Definition args.hpp:94
std::type_info type
Stores information about a type.
Definition type.hpp:23
@ p
The P key.
Definition console_key.hpp:118
The xtd::expressions namespace provides a lightweight, composable expression template framework for b...
Definition add.hpp:14
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Generates a set of positional args that can be decomposed using structured bindings to build readable...
Definition args.hpp:42
The xtd::expressions::arg object is arg for all expressions.
Definition arg.hpp:31
static const xtd::expressions::argument< index > arg
Gets the index argument used by expression.
Definition expression.hpp:95