STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

union_cast Union Template Reference

This class (union) effects conversion from one type to another, without the use of casts. More...

#include <stlsoft_union_cast.h>

List of all members.

Public Methods

 union_cast (from_type const from)
 Conversion constructor.

 operator to_type () const
 Implicit conversion operator.


Detailed Description

template<typename TO, typename FROM>
union stlsoft::union_cast< TO, FROM >

This class (union) effects conversion from one type to another, without the use of casts.

Note:
The use of this technique is non-portable, and you use this class at your own risk. Notwithstanding that, the TO and FROM types have to be the same size, so the technique is widely usable.


Constructor & Destructor Documentation

union_cast from_type const    from [inline, explicit]
 

Conversion constructor.


Member Function Documentation

operator to_type   const [inline]
 

Implicit conversion operator.


The documentation for this union was generated from the following file:

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004