From d911d71dfaf7d9ad62df91c79f5fdf2169be1b16 Mon Sep 17 00:00:00 2001 From: Martijn Otto Date: Mon, 27 Jun 2016 10:52:58 +0200 Subject: [PATCH] Removed the ugly typedef --- include/stack_ptr.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; }