C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise_2_0::no_boost::add_const_ref_impl< T, IsRef > Struct Template Reference

The default implementation adds a const& to the template type. More...

#include <exercise-2-0.hpp>

Public Types

typedef T const & type
 

Detailed Description

template<typename T, bool IsRef>
struct exercise_2_0::no_boost::add_const_ref_impl< T, IsRef >

The default implementation adds a const& to the template type.

Specializations are all partial, and specialize based on the IsRef parameter.

If IsRef is true, this simply returns the template parameter, unmodified.

Template Parameters
TThe datatype to alter.
IsRefA boolean value that should be true if T is already a reference type.

Definition at line 58 of file exercise-2-0.hpp.

Member Typedef Documentation

◆ type

template<typename T , bool IsRef>
typedef T const& exercise_2_0::no_boost::add_const_ref_impl< T, IsRef >::type

Definition at line 60 of file exercise-2-0.hpp.


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