C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise-2-2.hpp File Reference

Solution to Exercise 2-2. More...

#include <boost/static_assert.hpp>
#include <boost/type_traits/add_pointer.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <assert.h>

Go to the source code of this file.

Namespaces

namespace  exercise_2_2
 Encapsulate solution for Exercise 2-2.
 

Functions

template<typename Target , typename Source >
Target exercise_2_2::polymorphic_downcast (Source *const x)
 Check the validity of a downcast.
 
template<typename Target , typename Source >
Target exercise_2_2::polymorphic_downcast (Source &x)
 Check the validity of a downcast.
 

Detailed Description

Solution to Exercise 2-2.

Author
Matt Bisson

Definition in file exercise-2-2.hpp.