diff --git a/include/ebcl/inline/Types.hh b/include/ebcl/inline/Types.hh index d3717bc..5a3d2ac 100644 --- a/include/ebcl/inline/Types.hh +++ b/include/ebcl/inline/Types.hh @@ -891,7 +891,7 @@ template< typename T > inline T const& T_Optional< T >::operator*( ) const { if ( present_ ) { - return *target( ); + return *reinterpret_cast< T const* >( &storage_ ); } throw std::bad_cast( ); } @@ -900,7 +900,7 @@ template< typename T > inline T& T_Optional< T >::operator*( ) { if ( present_ ) { - return *target( ); + return *reinterpret_cast< T* >( &storage_ ); } throw std::bad_cast( ); } @@ -909,7 +909,7 @@ template< typename T > inline T const* T_Optional< T >::operator->( ) const { if ( present_ ) { - return target( ); + return reinterpret_cast< T const* >( &storage_ ); } throw std::bad_cast( ); } @@ -918,7 +918,7 @@ template< typename T > inline T* T_Optional< T >::operator->( ) { if ( present_ ) { - return target( ); + return reinterpret_cast< T* >( &storage_ ); } throw std::bad_cast( ); }