diff --git a/include/stack_ptr.h b/include/stack_ptr.h index a58f6fa..2318ed7 100644 --- a/include/stack_ptr.h +++ b/include/stack_ptr.h @@ -27,10 +27,9 @@ class stack_ptr private: /** * Storage for the object - * @var std::aligned_storage + * @var typename std::aligned_storage::type */ - typedef typename std::aligned_storage::type Type; - Type _data; + typename std::aligned_storage::type _data; /** * Is the pointer initialized? @@ -88,6 +87,8 @@ public: // initialize new object new (&_data) T(std::forward(parameters)...); + + // we are now initialized _initialized = true; }