C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_2_1::replace_type_dispatch< C, X, Y, Same > Struct Template Reference

Internal type used by replace_type. More...

#include <exercise-2-1.hpp>

Detailed Description

template<typename C, typename X, typename Y, bool Same>
struct exercise_2_1::replace_type_dispatch< C, X, Y, Same >

Internal type used by replace_type.

This type recurses through the datatype to do that actual replacement work. The replace_type metafunction recurses down through any non-leaf types, and this metafunction handles the leaf types. Thus, if C == X, return Y, and otherwise, we hand it back to replace_types.

Template Parameters
CA compound type to examine for substitutions
XThe source type to replace
YThe destination type to be placed where X was
SameDoes C == X?

Definition at line 80 of file exercise-2-1.hpp.


The documentation for this struct was generated from the following file: