Template Struct if_c

Struct Documentation

template<bool Condition, typename T1, typename T2>
struct if_c

The metaprogramming equivalent of the ‘if’ function.

This defines a compile time metafunctional version of the ‘if’ function. It configures the default response (that for when the boolean condition is true). The alternative (false) is configured in a specialisation.

See also

if_c<false,T1,T2>.

Template Parameters:
  • Condition – : the logical condition to test.

  • T1 – : the return type if true.

  • T2 – : the return type if false.

Public Types

typedef T1 type