Library of Assembled Shared Sources
lass::num::lass::meta::Select< Condition, TrueType, FalseType > Struct Template Reference

Select a type based on a meta condition that evaluates to meta::True or meta::False. More...

#include <basic_ops.h>

Detailed Description

template<typename Condition, typename TrueType, typename FalseType>
struct lass::num::lass::meta::Select< Condition, TrueType, FalseType >

Select a type based on a meta condition that evaluates to meta::True or meta::False.

It differs from meta::If by the fact that TrueType and FalseType do not have to be meta expressions, as a typedef is used rather than inheritance to select the type. meta::Select is useful if TrueType and FalseType are regular types like for example int or std::string.

Using meta::Wrap, you can express the functionality of meta::Select in terms of meta::If as following:

Select<Cond, A, B>::Type <-> If<Cond, Wrap<A>, Wrap<B> >::Type;
Select a type based on a meta condition that evaluates to meta::True or meta::False.
Definition basic_ops.h:70

Definition at line 69 of file basic_ops.h.


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