library of assembled shared sources

http://lass.cocamware.com

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 <select.h>


Detailed Description

template<typename Condition, typename TrueType, typename FalseType>
struct 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;

Definition at line 69 of file meta/select.h.


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

Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo