Apply suggested fix. Refs #4127.

[SVN r69251]
This commit is contained in:
Peter Dimov
2011-02-24 22:05:04 +00:00
parent 593093e46d
commit e3d2f2ee6b

View File

@ -49,7 +49,18 @@ private:
{
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();
#endif
initialized_ = false;
}
}