Library of Assembled Shared Sources
|
Evaluates meta expression TrueType or FalseType based on a meta condition Condition. More...
#include <if.h>
Evaluates meta expression TrueType or FalseType based on a meta condition Condition.
Depending on whether Condition is meta::True or meta::False, meta::If derives from TrueType or FalseType, thereby selecting the meta code path.
meta::If can roughly be expressed as meta::Select if only the resulting Type is needed.
Apart from being the shorter expression, using meta::If has the following benefits:
meta::If however cannot be used with fundamental types as you need to be able to derive from the result. This is not really a short coming, as meta::If is designed to select meta code paths, and not to select a type. Use meta::Select instead.