classPii::IfClass
#include <PiiMetaTemplate.h>
A conditional template that accepts a type name as the condition parameter.
Inherits Pii::If< Condition::boolValue, Then, Else >
Description
There condition class must declare a static constant called
boolValue. Otherwise, functions like If.
template <class T, class U> void myFunc() { // if T is four bytes and U is two bytes, MyType is int, otherwise long typedef Pii::IfClass<Pii::And<sizeof(T) == 4, sizeof(U) == 2>, int, long>::Type MyType; MyType myVal(0); }
Add a note
Not a single note added yet. Be the first, add yours.