Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Functions
to.h File Reference

A overflow checked shorthand for static_cast<T>(). More...

#include "limit.h"
#include <cassert>
#include <stdexcept>

Go to the source code of this file.

Functions

template<class D , class T >
to (const T &t)
 This template function serves as an alternative to static_cast<T>(). More...
 
template<class D , class T >
D * check_cast (T *t)
 This template function serves as a fast alternative to dynamic_cast, when you know the base offset is the same. More...
 
template<class D , class T >
const D * check_cast (const T *t)
 This template function serves as a fast alternative to dynamic_cast, when you know the base offset is the same. More...
 
template<class T >
const T safeDiv (const T num, const T denom)
 This function provids "safe" division operation, checks explicitly for zero. More...
 

Detailed Description

A overflow checked shorthand for static_cast<T>().