System::Is method

System::Is(const E&, const A&) method

Top-level matching function. Applies a pattern to a value.

template<typename A,typename E> std::enable_if_t<std::is_base_of<Details::Pattern, A>::value, bool> System::Is(const E &e, const A &a)
ParameterDescription
APattern type (must inherit from Details::Pattern).
EType of the value to match.
ParameterTypeDescription
econst E&Value to match against.
aconst A&Pattern to apply.

ReturnValue

true if the pattern matches the value.

See Also

System::Is(const ExpressionT&, const ConstantT&) method

Implements ‘is’ constant pattern translation.

template<class ExpressionT,class ConstantT> std::enable_if_t<!std::is_base_of<Details::Pattern, ConstantT>::value, bool> System::Is(const ExpressionT &left, const ConstantT &constant)
ParameterDescription
ExpressionTleft expression type.
ConstantTtype of constant expression.
ParameterTypeDescription
leftconst ExpressionT&expression which will be checked.
constantconst ConstantT&expression which will be compared with left one.

ReturnValue

true if type check is successfull, false otherwise.

See Also

System::Is(const ExpressionT&, ResultT&) method

Implements ‘is’ declaration pattern translation.

template<class PatternT,class ExpressionT,class ResultT> bool System::Is(const ExpressionT &left, ResultT &result)
ParameterDescription
PatternTtype to check.
ExpressionTleft expression type.
ResultTtype of result expression.
ParameterTypeDescription
leftconst ExpressionT&expression which will be checked.
resultResultT&variable which will be assigned to checked type.

ReturnValue

true if type check is successfull, false otherwise.

See Also