#include <Types.hh>

Original template Copyright (c) 2006 Michal 'Sektor' Malecki Pawel Sikora Distributed under the Boost Software License, Version 1.0. ( See at http://www.boost.org/LICENSE_1_0.txt )
template<class T> struct explicit_t { private: T value; template< class V > explicit_t( V t ); public: operator T & () { return value; } explicit_t( const T& c ): value( c ) { } };
Template allows us to kill any implicit conversions of built-in types. Especially int, short, unsigned * and double. Modifications allows to initialize arrays in classes and allows us creating T types from const T types.
Definition at line 58 of file Types.hh.
Public Member Functions | |
| operator T & () | |
| operator const T & () const | |
| explicit_t (const T &c) | |
| explicit_t () | |
Private Member Functions | |
| template<typename V> | |
| explicit_t (const V &t) | |
Private Attributes | |
| T | value |
| explicit_t< T >::explicit_t | ( | const V & | t | ) | [inline, private] |
Private constructor from any other type
| explicit_t< T >::explicit_t | ( | const T & | c | ) | [inline] |
| explicit_t< T >::explicit_t | ( | ) | [inline] |
| explicit_t< T >::operator T & | ( | ) | [inline] |
| explicit_t< T >::operator const T & | ( | ) | const [inline] |
In case we have const this pointer return const reference
Definition at line 77 of file Types.hh.
References explicit_t< T >::value.
T explicit_t< T >::value [private] |
Real hidden in template value
Definition at line 64 of file Types.hh.
Referenced by explicit_t< T >::operator const T &(), and explicit_t< T >::operator T &().
1.5.5