Itasca C++ Interface
Loading...
Searching...
No Matches
Static Public Attributes | List of all members
itasca::type_selector< condition, if_true, if_false > Struct Template Reference

Class used to select between two types based on a given condition. More...

#include <type_selector.h>

Static Public Attributes

static const bool result
 

Detailed Description

template<bool condition, typename if_true, typename if_false>
struct itasca::type_selector< condition, if_true, if_false >

Class used to select between two types based on a given condition.

Author
JT Davies
Parameters
conditionEither true or false; determines which specification to use.
if_trueType to be stored if true.
if_falseType to be stored if false.

This class uses template metaprogramming to act as an "if" statement to determine whether to use one type or another. If compile-time values such as sizeof(), or simply constants, are solely involved in condition, this can be evaluated at compile time.


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