C++ Template Metaprogramming
Solutions to the exercises throughout the book
All Classes Namespaces Files Functions Variables Typedefs Macros Modules Pages
exercise_2_1::replace_type< C, X, Y > Struct Template Reference

Given an arbitrary compound type, replace nested types. More...

#include <exercise-2-1.hpp>

Detailed Description

template<typename C, typename X, typename Y>
struct exercise_2_1::replace_type< C, X, Y >

Given an arbitrary compound type, replace nested types.

A ternary metafunction that takes an arbitrary compound type as its first parameter, and replaces all occurrences of a given source type with a given destination type.

If X does not exist within C, this metafunction results in a compilation error.

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

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


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