C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter-4-undefined_bool.hpp
Go to the documentation of this file.
1
// ===-- chapter-4/chapter-4-undefined_bool.hpp ----------- -*- C++ -*- --=== //
13
#ifndef CHAPTER_4_UNDEFINED_BOOL
14
#define CHAPTER_4_UNDEFINED_BOOL
15
16
19
namespace
chapter4
{
20
25
template
<
bool
B>
struct
undefined_false
;
26
28
template
<>
struct
undefined_false
<true>
29
{
30
static
bool
const
value =
true
;
31
typedef
undefined_false<true>
type
;
32
};
33
34
38
template
<
bool
B>
struct
undefined_true
;
39
41
template
<>
struct
undefined_true
<false>
42
{
43
static
bool
const
value =
false
;
44
typedef
undefined_true<false>
type
;
45
};
46
47
}
// namespace chapter4
48
49
#endif
// CHAPTER_4_UNDEFINED_BOOL
chapter4
Provide utilities availble to all Chapter 4 solutions.
Definition:
chapter-4-undefined_bool.hpp:19
chapter4::undefined_false< true >::type
undefined_false< true > type
Definition:
chapter-4-undefined_bool.hpp:31
chapter4::undefined_false
If the template parameter is false, template instantiation is an error.
Definition:
chapter-4-undefined_bool.hpp:25
chapter4::undefined_true< false >::type
undefined_true< false > type
Definition:
chapter-4-undefined_bool.hpp:44
chapter4::undefined_true
If the template parameter is true, template instantiation is an error.
Definition:
chapter-4-undefined_bool.hpp:38
chapter-4
chapter-4-undefined_bool.hpp
Generated on Fri Mar 8 2024 12:11:47 for C++ Template Metaprogramming by
1.9.6