The xtd::expressions namespace provides a lightweight, composable expression template framework for building and evaluating lazy, strongly-typed functional expressions from arbitrary callables.
Functions | |
| template<size_t count> | |
| constexpr auto | args () |
| Generates a set of positional placeholders that can be decomposed using structured bindings to build readable and composable expression templates. | |
| template<typename member_t> | |
| constexpr auto | member (member_t member) |
| The xtd::expressions::member is use to bind object member. | |
| template<typename member_t> | |
| constexpr auto | member (const char *name, member_t member) |
| The xtd::expressions::member is use to bind object member. | |
| template<typename method_t, typename... args_t> | |
| constexpr auto | method (method_t method, args_t &&... args) |
| The xtd::expressions::method is use to bind object method. | |
| template<typename method_t, typename... args_t> | |
| constexpr auto | method (const char *name, method_t method, args_t &&... args) |
| The xtd::expressions::method is use to bind object method. | |
Public Variables | |
| template<size_t index> | |
| constexpr xtd::expressions::placeholder< index > | arg |
| The xtd::expressions::arg instance is the index argument used by expression. | |
| constexpr auto | _ |
| The xtd::expressions::_ placeholder instance is used by expression that have only one argument. | |
| constexpr auto | _1 |
| The xtd::expressions::_1 placeholder instance is first argument used by expression. | |
| constexpr auto | _2 |
| The xtd::expressions::_2 placeholder instance is second argument used by expression. | |
| constexpr auto | _3 |
| The xtd::expressions::_3 placeholder instance is third argument used by expression. | |
| constexpr auto | _4 |
| The xtd::expressions::_4 placeholder instance is fourth argument used by expression. | |
| constexpr auto | _5 |
| The xtd::expressions::_5 placeholder instance is fifth argument used by expression. | |
| constexpr auto | _6 |
| The xtd::expressions::_6 placeholder instance is sixth argument used by expression. | |
| constexpr auto | _7 |
| The xtd::expressions::_7 placeholder instance is seventh argument used by expression. | |
| constexpr auto | _8 |
| The xtd::expressions::_8 placeholder instance is eighth argument used by expression. | |
| constexpr auto | _9 |
| The xtd::expressions::_9 placeholder instance is ninth argument used by expression. | |
| constexpr auto | _10 |
| The xtd::expressions::_10 placeholder instance is tenth argument used by expression. | |
Public Operators | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator+ (left_t left, right_t right) |
| Add the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator& (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator<=> (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator/ (left_t left, right_t right) |
| Divide the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator== (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator> (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator>= (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> && (!std::is_base_of_v<std::ostream, std::remove_reference_t <left_t>>) | |
| constexpr auto | operator<< (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator< (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator<= (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator&& (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename value_t> requires expression_operand<value_t> | |
| constexpr auto | operator! (value_t value) |
| Add the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator|| (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename expression_t, typename member_t> requires expression_operand<expression_t> || expression_operand<member_type<member_t>> | |
| constexpr auto | operator* (expression_t expression, member_type< member_t > member) |
| Bind member operator. | |
| template<typename expression_t, typename member_t> requires expression_operand<expression_t> || expression_operand<member_type<member_t>> | |
| constexpr auto | operator| (expression_t expression, member_type< member_t > member) |
| Bind member operator. | |
| template<typename expression_t, typename method_t, typename... stored_args_t> requires expression_operand<expression_t> || expression_operand<method_type<method_t, stored_args_t...>> | |
| constexpr auto | operator* (expression_t expression, method_type< method_t, stored_args_t... > method) |
| Bind method operator. | |
| template<typename expression_t, typename method_t, typename... stored_args_t> requires expression_operand<expression_t> || expression_operand<method_type<method_t, stored_args_t...>> | |
| constexpr auto | operator| (expression_t expression, method_type< method_t, stored_args_t... > method) |
| Bind method alternative operator. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator% (left_t left, right_t right) |
| Performs a modulo on the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator* (left_t left, right_t right) |
| Multiply the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator!= (left_t left, right_t right) |
| Equal to the specified left and right operands. | |
| template<typename value_t> requires expression_operand<value_t> | |
| constexpr auto | operator~ (value_t value) |
| Add the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator| (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator>> (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator- (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
| template<typename value_t> requires expression_operand<value_t> | |
| constexpr auto | operator- (value_t value) |
| Add the specified left and right operands. | |
| template<typename value_t> requires expression_operand<value_t> | |
| constexpr auto | operator+ (value_t value) |
| Add the specified left and right operands. | |
| template<typename left_t, typename right_t> requires expression_operand<left_t> || expression_operand<right_t> | |
| constexpr auto | operator^ (left_t left, right_t right) |
| Subtract the specified left and right operands. | |
Public Functions | |
| template<typename type_t> requires expression_operand<type_t> | |
| constexpr decltype(auto) | as_expression (type_t &&value) |
| The xtd::expressions::as_expression method convert a type as xtd::expressions::expression. | |
| template<typename type_t> requires (!expression_operand<type_t>) | |
| constexpr auto | as_expression (type_t &&value) |
| The xtd::expressions::as_expression method convert a type as xtd::expressions::value. | |