Removed the ugly typedef
This commit is contained in:
parent
45131a1884
commit
d911d71dfa
|
|
@ -27,10 +27,9 @@ class stack_ptr
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Storage for the object
|
* Storage for the object
|
||||||
* @var std::aligned_storage<sizeof(T), alignof(T)>
|
* @var typename std::aligned_storage<sizeof(T), alignof(T)>::type
|
||||||
*/
|
*/
|
||||||
typedef typename std::aligned_storage<sizeof(T), alignof(T)>::type Type;
|
typename std::aligned_storage<sizeof(T), alignof(T)>::type _data;
|
||||||
Type _data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the pointer initialized?
|
* Is the pointer initialized?
|
||||||
|
|
@ -88,6 +87,8 @@ public:
|
||||||
|
|
||||||
// initialize new object
|
// initialize new object
|
||||||
new (&_data) T(std::forward<Arguments>(parameters)...);
|
new (&_data) T(std::forward<Arguments>(parameters)...);
|
||||||
|
|
||||||
|
// we are now initialized
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue