Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
down_cast.hh File Reference

Fast polymorphic down-casting functions. More...

#include <utility/assert.hh>

Classes

struct  utility::RawType< T >
 Meta-programming classes to provide the pointer type for down_cast. More...
 
struct  utility::RawType< T & >
 
struct  utility::RawType< T * >
 

Namespaces

 utility
 unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 0.
 

Functions

template<class Target , class Source >
Target utility::down_cast (Source &s)
 Fast assert-checked polymorphic down-cast: reference argument. More...
 
template<class Target , class Source >
Target utility::down_cast (Source *p)
 Fast assert-checked polymorphic down-cast: pointer argument. More...
 

Detailed Description

Fast polymorphic down-casting functions.

Author
Stuart G. Mentzer (Stuar.nosp@m.t_Me.nosp@m.ntzer.nosp@m.@obj.nosp@m.exx.c.nosp@m.om)
Note
A fast polymorphic down-cast when the cast is known to be valid
The cast validity is assert-checked in debug builds