You.i Engine
YiEnableIf< CONDITION, TYPE > Struct Template Reference

Detailed Description

template<bool CONDITION, class TYPE = void>
struct YiEnableIf< CONDITION, TYPE >

Template trait utility that enables or disables a templated function or class.

The first parameter of the template is the expression used to enable or disable the template, and the second parameter is the type to transfer. The type is then available through the type member.

Example:

template<typename T>
static typedef YiEnableIf<IsArithmetic<T>::value, T>::type Multiply(T value1, T value2)
{
return value1 * value2;
}

#include <utility/YiTypeTraits.h>


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