IF#

Conditional “if” statement for operators

template<typename T1, typename T2>
auto matx::IF(T1 t1, T2 t2)#

Compares two operators or views and conditionally executes the second statement if the first is true. Values from an operator are executed individually, and the only requirement for the conditional is the comparison operator must be defined for the particular type. For example, operator< on two integers is okay, but the same operator on two complex numbers will give a compiler error.

Parameters:
  • t1 – op1

  • t2 – op2

Examples#

IF(tiv0 == tiv0, tov0 = c).run(exec);