C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y > Struct Template Reference

Decend through all aspects of pointers to functions. More...

#include <exercise-2-1.hpp>

Public Types

using ret_type = replace_type_dispatch< Cr, X, Y, std::is_same< Cr, X >::value >::type
 The return type of the "replaced" function.
 
using func_type = ret_type(typename replace_type_dispatch< CArgs, X, Y, std::is_same< CArgs, X >::value >::type...)
 The signature of the replaced function.
 
using type = func_type *
 

Detailed Description

template<typename Cr, typename... CArgs, typename X, typename Y>
struct exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y >

Decend through all aspects of pointers to functions.

Definition at line 103 of file c++20/exercise-2-1.hpp.

Member Typedef Documentation

◆ func_type

template<typename Cr , typename... CArgs, typename X , typename Y >
using exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y >::func_type = ret_type( typename replace_type_dispatch< CArgs, X, Y, std::is_same<CArgs, X>::value >::type...)

The signature of the replaced function.

Definition at line 114 of file c++20/exercise-2-1.hpp.

◆ ret_type

template<typename Cr , typename... CArgs, typename X , typename Y >
using exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y >::ret_type = replace_type_dispatch< Cr, X, Y, std::is_same<Cr, X>::value >::type

The return type of the "replaced" function.

Definition at line 106 of file c++20/exercise-2-1.hpp.

◆ type

template<typename Cr , typename... CArgs, typename X , typename Y >
using exercise_2_1::cpp20::replace_type< Cr(*)(CArgs...), X, Y >::type = func_type*

Definition at line 122 of file c++20/exercise-2-1.hpp.


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