Alchemy
1.0
A framework to robustly process network messages and structured data
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Pb
detail
conditional.h
Go to the documentation of this file.
1
/// @file Pb/detail/conditional.h
2
///
3
/// Provides std::conditional for tr1 implementations that do not support it.
4
///
5
/// The MIT License(MIT)
6
/// @copyright 2014 Paul M Watt
7
// ****************************************************************************
8
#ifndef PB_DETAIL_CONDITIONAL_H_INCLUDED
9
#define PB_DETAIL_CONDITIONAL_H_INCLUDED
10
11
namespace
Pb
12
{
13
14
// ***************************************************************************
15
/// Provides an implementation of a compile-time conditional when the local
16
/// library does not support it.
17
///
18
template
<
bool
Predicate,
19
class
TrueType,
20
class
FalseType
21
>
22
struct
conditional
23
{
24
typedef
TrueType type;
25
};
26
27
// ***************************************************************************
28
/// Specialization for the false condition of the conditional.
29
///
30
template
<
class
TrueType,
31
class
FalseType
32
>
33
struct
conditional
<false, TrueType, FalseType>
34
{
35
typedef
FalseType type;
36
};
37
38
}
// namespace Pb
39
40
#endif
Generated on Sat May 9 2015 21:25:05 for Alchemy by
1.8.3.1