Provides the base class from which the classes that represent expression tree nodes are derived. It also contains static factory methods to create the various node types. This is an abstract class.
- Namespace
- xtd::expressions
- Header
#include <xtd/expressions/expression>
- Library
- xtd.core
- Examples
- The following example shos how to use xtd::expressions::expression class.
#include <xtd/xtd>
auto main() -> int {
println(
"expr1 resutl = {}", expr1(10, 20));
println(
"type_of(expr1) = {}", type_of(expr1));
println(
"expr2 resutl = {}", expr2(10, 20));
println(
"type_of(expr2) = {}", type_of(expr2));
}
constexpr auto _2
The xtd::expressions::_2 placeholder instance is second argument used by expression.
Definition args.hpp:117
constexpr auto _1
The xtd::expressions::_1 placeholder instance is first argument used by expression.
Definition args.hpp:92
void println()
Writes the current line terminator to the standard output stream using the specified format informati...
Definition println.hpp:167
static constexpr auto add(left_t left, right_t right)
Add the specified left and right operands.
static constexpr auto multiply(left_t left, right_t right)
Multiply the specified left and right operands.
static constexpr auto value(type_t value)
Gets the value value.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | add (left_t left, right_t right) |
| | Add the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | and_ (left_t left, right_t right) |
| | Bitwise and the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | and_also (left_t left, right_t right) |
| | Logical and the specified left and right operands.
|
| template<size_t index> |
| static constexpr auto | arg () |
| | Gets the index argument used by expression.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | compare_three_way (left_t left, right_t right) |
| | Compare three way the specified left and right operands.
|
| template<auto constant_value> |
| static constexpr auto | constant () |
| | Gets the constant value.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | divide (left_t left, right_t right) |
| | Divide the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | equal (left_t left, right_t right) |
| | Equal the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | greater_than (left_t left, right_t right) |
| | Greater than the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | greater_than_or_equal (left_t left, right_t right) |
| | Greater than or equzl the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | left_shift (left_t left, right_t right) |
| | Left shift the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | less_than (left_t left, right_t right) |
| | Less than the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | less_than_or_equal (left_t left, right_t right) |
| | Less than or equal the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | logical_and (left_t left, right_t right) |
| | Logical and the specified left and right operands.
|
| template<typename value_t> |
| static constexpr auto | logical_not (value_t value) |
| | Logical not the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | logical_or (left_t left, right_t right) |
| | Logical or the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | modulo (left_t left, right_t right) |
| | Modulo the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | multiply (left_t left, right_t right) |
| | Multiply the specified left and right operands.
|
| template<typename value_t> |
| static constexpr auto | negate (value_t value) |
| | Unary minus the specified left and right operands.
|
| template<typename value_t> |
| static constexpr auto | not_ (value_t value) |
| | Bitwise not the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | not_equal (left_t left, right_t right) |
| | Not equal the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | or_ (left_t left, right_t right) |
| | Bitwise or the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | or_else (left_t left, right_t right) |
| | Logical or the specified left and right operands.
|
| template<size_t index> |
| static constexpr auto | placeholder () |
| | Gets the index placeholder used by expression.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | right_shift (left_t left, right_t right) |
| | Right shift the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | spaceship (left_t left, right_t right) |
| | Compare three way the specified left and right operands.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | subtract (left_t left, right_t right) |
| | Subtract the specified left and right operands.
|
| template<typename value_t> |
| static constexpr auto | unary_minus (value_t value) |
| | Unary minus the specified left and right operands.
|
| template<typename value_t> |
| static constexpr auto | unary_plus (value_t value) |
| | Unary plus the specified left and right operands.
|
| template<typename type_t> |
| static constexpr auto | value (type_t value) |
| | Gets the value value.
|
| template<typename left_t, typename right_t> |
| static constexpr auto | xor_ (left_t left, right_t right) |
| | Bitwise xor the specified left and right operands.
|