xtd 1.0.0
Loading...
Searching...
No Matches
xtd::expressions::if_then_else_expression< condition_t, then_t, else_t > Struct Template Reference
Inheritance diagram for xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >:
xtd::expressions::conditional_expression xtd::expressions::expression

Definition

template<typename condition_t, typename then_t, typename else_t>
struct xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >

The xtd::expressions::if_then_else_expression is the addition expression.

Namespace
xtd::expressions
Header
#include <xtd/expressions/if_then_else_expression>
Library
xtd.core
Remarks
The xtd::expressions::if_then_else_expression struct is used by xtd::expressions::operator +().
Examples
The following example shows how to use xtd::expressions::if_then_else_expression.

Public Fields

static constexpr operator_precedence precedence
 The operator precedence. That contains one of xtd::expressions::operator_precedence values.

Public Constructors

constexpr if_then_else_expression ()=default
 Initialize a new xtd::expressions::if_then_else_expression object.
constexpr if_then_else_expression (condition_t condition, then_t then_, else_t else_)
 Initialize a new xtd::expressions::logical_or_expression object with specified left and right operands. @oaram condition The condition.

Public Operators

template<typename... args_t>
constexpr auto operator() (args_t &&... args) const
 Equal to the specified arguments.

Additional Inherited Members

Constructor & Destructor Documentation

◆ if_then_else_expression() [1/2]

template<typename condition_t, typename then_t, typename else_t>
xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >::if_then_else_expression ( )
constexprdefault

◆ if_then_else_expression() [2/2]

template<typename condition_t, typename then_t, typename else_t>
xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >::if_then_else_expression ( condition_t condition,
then_t then_,
else_t else_ )
inlineconstexpr

Initialize a new xtd::expressions::logical_or_expression object with specified left and right operands. @oaram condition The condition.

Parameters
then_The then expression.
elseThe else expression.

Member Function Documentation

◆ operator()()

template<typename condition_t, typename then_t, typename else_t>
template<typename... args_t>
auto xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >::operator() ( args_t &&... args) const
inlineconstexpr

Equal to the specified arguments.

Parameters
argsthe arguments to or.
Returns
The result of if then else.

Member Data Documentation

◆ precedence

template<typename condition_t, typename then_t, typename else_t>
operator_precedence xtd::expressions::if_then_else_expression< condition_t, then_t, else_t >::precedence
staticconstexpr

The operator precedence. That contains one of xtd::expressions::operator_precedence values.


The documentation for this struct was generated from the following file: