#include <stlsoft/conversion/union_cast.hpp>
This class (union) effects conversion from one type to another, without the use of casts.
TO | The type to cast to | |
FROM | The type to cast from | |
B_CHECK_ALIGN | Determines the default checking behaviour. If 0, no checking on alignment is conducted |
Public Types | |
Member Types | |
typedef TO | to_type |
The type to cast to. | |
typedef FROM | from_type |
The type to cast from. | |
typedef union_caster< TO, FROM, B_CHECK_ALIGN > | class_type |
The current instantiation of the type. | |
Public Member Functions | |
Construction | |
union_caster (from_type const from, bool bCheckAlign=B_CHECK_ALIGN) | |
Conversion constructor. | |
Conversion | |
operator to_type () const | |
Implicit conversion operator. |
typedef TO to_type |
The type to cast to.
typedef FROM from_type |
The type to cast from.
typedef union_caster<TO, FROM, B_CHECK_ALIGN> class_type |
The current instantiation of the type.
union_caster | ( | from_type const | from, | |
bool | bCheckAlign = B_CHECK_ALIGN | |||
) | [inline, explicit] |
Conversion constructor.
or a change of type, but not both.
References ss_typename_type_k, STLSOFT_MESSAGE_ASSERT, STLSOFT_STATIC_ASSERT, and STLSOFT_SUPPRESS_UNUSED.
operator to_type | ( | ) | const [inline] |
Implicit conversion operator.