Merge branch 'javeme-aligned_storage-crash'

This commit is contained in:
Martijn Otto 2016-06-27 10:48:51 +02:00
commit 45131a1884
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,8 @@ private:
* Storage for the object
* @var std::aligned_storage<sizeof(T), alignof(T)>
*/
std::aligned_storage<sizeof(T), alignof(T)> _data;
typedef typename std::aligned_storage<sizeof(T), alignof(T)>::type Type;
Type _data;
/**
* Is the pointer initialized?
@ -87,6 +88,7 @@ public:
// initialize new object
new (&_data) T(std::forward<Arguments>(parameters)...);
_initialized = true;
}
/**