template<size_t count>
struct xtd::expressions::args< count >
Generates a set of positional args that can be decomposed using structured bindings to build readable and composable expression templates.
- Namespace
- xtd::expressions
- Header
#include <xtd/expressions/args>
- Library
- xtd.core
- Examples
- The following example shows how to use xtd::expressions::expression::args.
#include <xtd/xtd>
auto main() -> int {
auto [operand_one, operand_two] =
args<2>();
auto expr1 = operand_one + operand_two;
println(
"expr1 result => {}", expr1(10, 20));
println(
"expr2 result => {}", expr2(10, 20));
}
constexpr auto _2
The xtd::expressions::_2 arg instance is second argument used by expression.
Definition args.hpp:119
constexpr auto _1
The xtd::expressions::_1 arg instance is first argument used by expression.
Definition args.hpp:94
auto println(FILE *file) -> void
Writes the current line terminator to the file output stream using the specified format information.
Definition println.hpp:15
Generates a set of positional args that can be decomposed using structured bindings to build readable...
Definition args.hpp:42