|
C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Describe a data-type in English. More...
Files | |
| file | c++20/exercise-2-5.hpp |
| Solution to Exercise 2-5 (C++20). | |
| file | exercise-2-5.hpp |
| Solution to Exercise 2-5. | |
Namespaces | |
| namespace | exercise_2_5 |
| Encapsulate solution for Exercise 2-5. | |
| namespace | exercise_2_5::cpp20 |
| Encapsulate solution for Exercise 2-5 (C++20). | |
Functions | |
| static void | anonymous_namespace{chapter-2.cpp}::test_exercise_2_5 () |
| Tests for Exercise 2-5. | |
Describe a data-type in English.
2-5. Change the type_descriptor template from exercise 2-3 to output a
pseudo-English description of the type, along the lines of the explain
command of the cdecl program:
// prints "array of pointer to function returning pointer to"
// "char"
std::cout << type_descriptor< char *(*[])() >();
|
static |
Tests for Exercise 2-5.
Definition at line 195 of file chapter-2.cpp.