@@ -286,7 +286,7 @@ namespace cereal
286286 {
287287 // Storage type for the pointer - since we can't default construct this type,
288288 // we'll allocate it using std::aligned_storage and use a custom deleter
289- using ST = typename std::aligned_storage<sizeof (T), CEREAL_ALIGNOF (T)>::type;
289+ using AlignedStorage = typename std::aligned_storage<sizeof (T), CEREAL_ALIGNOF (T)>::type;
290290
291291 // Valid flag - set to true once construction finishes
292292 // This prevents us from calling the destructor on
@@ -296,13 +296,13 @@ namespace cereal
296296 // Allocate our storage, which we will treat as
297297 // uninitialized until initialized with placement new
298298 using NonConstT = typename std::remove_const<T>::type;
299- std::shared_ptr<NonConstT> ptr (reinterpret_cast <NonConstT *>(new ST ()),
299+ std::shared_ptr<NonConstT> ptr (reinterpret_cast <NonConstT *>(new AlignedStorage ()),
300300 [=]( NonConstT * t )
301301 {
302302 if ( *valid )
303303 t->~T ();
304304
305- delete reinterpret_cast <ST *>( t );
305+ delete reinterpret_cast <AlignedStorage *>( t );
306306 } );
307307
308308 // Register the pointer
@@ -377,11 +377,11 @@ namespace cereal
377377 using NonConstT = typename std::remove_const<T>::type;
378378 // Storage type for the pointer - since we can't default construct this type,
379379 // we'll allocate it using std::aligned_storage
380- using ST = typename std::aligned_storage<sizeof (NonConstT), CEREAL_ALIGNOF (NonConstT)>::type;
380+ using AlignedStorage = typename std::aligned_storage<sizeof (NonConstT), CEREAL_ALIGNOF (NonConstT)>::type;
381381
382- // Allocate storage - note the ST type so that deleter is correct if
382+ // Allocate storage - note the AlignedStorage type so that deleter is correct if
383383 // an exception is thrown before we are initialized
384- std::unique_ptr<ST > stPtr ( new ST () );
384+ std::unique_ptr<AlignedStorage > stPtr ( new AlignedStorage () );
385385
386386 // Use wrapper to enter into "data" nvp of ptr_wrapper
387387 memory_detail::LoadAndConstructLoadWrapper<Archive, NonConstT> loadWrapper ( reinterpret_cast <NonConstT *>( stPtr.get () ) );
0 commit comments