Blaze
3.9
blaze
util
mpl
If.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_UTIL_MPL_IF_H_
36
#define _BLAZE_UTIL_MPL_IF_H_
37
38
39
namespace
blaze {
40
41
//=================================================================================================
42
//
43
// CLASS DEFINITION
44
//
45
//=================================================================================================
46
47
//*************************************************************************************************
56
template
<
bool
Condition >
// Compile time selection
57
struct
If
58
{
59
public
:
60
//**********************************************************************************************
62
template
<
typename
T1,
typename
T2 >
63
using
Type = T1;
65
//**********************************************************************************************
66
};
67
//*************************************************************************************************
68
69
70
//*************************************************************************************************
79
template
<>
80
struct
If
<false>
81
{
82
public
:
83
//**********************************************************************************************
84
template
<
typename
T1,
typename
T2 >
85
using
Type = T2;
86
//**********************************************************************************************
87
};
89
//*************************************************************************************************
90
91
92
//*************************************************************************************************
105
template
<
bool
Condition
// Compile time selection
106
,
typename
T1
// Type to be selected if Condition=true
107
,
typename
T2 >
// Type to be selected if Condition=false
108
using
If_t
=
typename
If<Condition>::template
Type<T1,T2>;
109
//*************************************************************************************************
110
111
}
// namespace blaze
112
113
#endif
blaze::If_t
typename If< Condition >::template Type< T1, T2 > If_t
Auxiliary alias template for the If class template.
Definition:
If.h:108
blaze::If
Compile time type selection.
Definition:
If.h:58
Generated by
1.9.3