Rosetta 3.3
Classes | Namespaces | Functions
src/utility/down_cast.hh File Reference

Fast polymorphic down-casting functions. More...

#include <cassert>

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

namespace  utility
 

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


Functions

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

Detailed Description

Fast polymorphic down-casting functions.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Note:
A fast polymorphic down-cast when the cast is known to be valid
The cast validity is assert-checked in debug builds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines