C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter-5-tree.hpp
Go to the documentation of this file.
1
// ===-- chapter-5/chapter-5-tree.hpp --------------------- -*- C++ -*- --=== //
9
#ifndef CHAPTER_5_10_TREE
10
#define CHAPTER_5_10_TREE
11
12
#include <boost/mpl/void.hpp>
13
using
boost::mpl::void_;
14
15
16
namespace
chapter5
{
17
19
struct
tree_tag
{ };
20
31
template
<
typename
Cur =
void
_,
typename
L =
void
_,
typename
R =
void
_>
32
struct
tree
33
{
34
typedef
tree<Cur, L, R>
type
;
35
typedef
tree_tag
tag
;
36
};
37
38
}
// namespace chapter5
39
40
#endif
// CHAPTER_5_10_TREE
chapter5
Provide utilities availble to all Chapter 5 solutions.
Definition:
chapter-5-tiny.hpp:37
chapter5::tree_tag
Used for Boost MPL's tag-based dispatch of sequence metafunctions.
Definition:
chapter-5-tree.hpp:19
chapter5::tree
A basic type to represent a binary tree.
Definition:
chapter-5-tree.hpp:33
chapter5::tree::type
tree< Cur, L, R > type
Definition:
chapter-5-tree.hpp:34
chapter5::tree::tag
tree_tag tag
Definition:
chapter-5-tree.hpp:35
chapter-5
chapter-5-tree.hpp
Generated on Fri Mar 8 2024 12:11:48 for C++ Template Metaprogramming by
1.9.6