toast/illegal_cast.hpp File Reference


Detailed Description

This file contains the toast::illegal_cast template.

#include <boost/type_traits.hpp>

Go to the source code of this file.

Namespaces

namespace  toast

Classes

struct  toast::BAD_CAST< true >

Defines

#define TOAST_BAD_CAST_AT_RUNTIME_INTERNAL   0
#define TOAST_BAD_CAST_COMPILETIME(condition)   typedef typename BAD_CAST< condition >::result_type invalid_cast_test
#define TOAST_BAD_CAST_RUNTIME(condition)   if(!(condition)) throw std::bad_cast();
#define TOAST_BAD_CAST

Functions

template<typename T, typename V>
toast::illegal_cast (V v)
 perform casts not supported by the standard operators.
template<>
void * toast::illegal_cast< void *, bool > (bool b)


Define Documentation

#define TOAST_BAD_CAST

Value:

BOOST_PP_IIF(TOAST_BAD_CAST_AT_RUNTIME_INTERNAL,  \
    TOAST_BAD_CAST_RUNTIME,                         \
    TOAST_BAD_CAST_COMPILETIME)


SourceForge.net Logo