|
C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Solution to Exercise 2-1. More...
#include <boost/type_traits/add_pointer.hpp>#include <boost/type_traits/add_reference.hpp>#include <boost/type_traits/is_same.hpp>Go to the source code of this file.
Classes | |
| struct | exercise_2_1::replace_type< C, X, Y > |
| Given an arbitrary compound type, replace nested types. More... | |
| struct | exercise_2_1::replace_type_dispatch< C, X, Y, Same > |
| Internal type used by replace_type. More... | |
| struct | exercise_2_1::replace_type< C *, X, Y > |
| Descend through pointer types. More... | |
| struct | exercise_2_1::replace_type< C &, X, Y > |
| Descend through reference types. More... | |
| struct | exercise_2_1::replace_type< C[N], X, Y > |
| Descend through array types. More... | |
| struct | exercise_2_1::replace_type< Cr(*)(), X, Y > |
| Descent through nullary function types. More... | |
| struct | exercise_2_1::replace_type< Cr(*)(C0), X, Y > |
| Descent through unary function types. More... | |
| struct | exercise_2_1::replace_type< Cr(*)(C0, C1), X, Y > |
| Descent through binary function types. More... | |
| struct | exercise_2_1::replace_type_dispatch< C, X, Y, true > |
| Replace leaf types. More... | |
| struct | exercise_2_1::replace_type_dispatch< C, X, Y, false > |
| Recurse into replace_type. More... | |
Namespaces | |
| namespace | exercise_2_1 |
| Encapsulate solution for Exercise 2-1. | |
Solution to Exercise 2-1.
Definition in file exercise-2-1.hpp.