mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 05:34:36 +02:00
@@ -49,7 +49,18 @@ private:
|
|||||||
{
|
{
|
||||||
if( initialized_ )
|
if( initialized_ )
|
||||||
{
|
{
|
||||||
|
#if defined( __GNUC__ )
|
||||||
|
|
||||||
|
// fixes incorrect aliasing warning
|
||||||
|
T * p = reinterpret_cast< T* >( storage_.data_ );
|
||||||
|
p->~T();
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
reinterpret_cast< T* >( storage_.data_ )->~T();
|
reinterpret_cast< T* >( storage_.data_ )->~T();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
initialized_ = false;
|
initialized_ = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user