C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Solution to Exercise 2-1 (C++20). More...
#include <cstddef>
#include <type_traits>
Go to the source code of this file.
Classes | |
struct | exercise_2_1::cpp20::replace_type< C, X, Y > |
Given an arbitrary compound type, replace nested types. More... | |
struct | exercise_2_1::cpp20::replace_type_dispatch< C, X, Y, Same > |
Internal type used by replace_type. More... | |
struct | exercise_2_1::cpp20::replace_type< C *, X, Y > |
Descend through pointer types. More... | |
struct | exercise_2_1::cpp20::replace_type< C &, X, Y > |
Descend through reference types. More... | |
struct | exercise_2_1::cpp20::replace_type< C[N], X, Y > |
Descend through array types. More... | |
struct | exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y > |
Decend through all aspects of pointers to functions. More... | |
struct | exercise_2_1::cpp20::replace_type_dispatch< C, X, Y, true > |
Replace leaf types. More... | |
struct | exercise_2_1::cpp20::replace_type_dispatch< C, X, Y, false > |
Recurse into replace_type. More... | |
Namespaces | |
namespace | exercise_2_1 |
Encapsulate solution for Exercise 2-1. | |
namespace | exercise_2_1::cpp20 |
Encapsulate solution for Exercise 2-1 (C++20). | |
Solution to Exercise 2-1 (C++20).
Definition in file c++20/exercise-2-1.hpp.