From ea67724ff583fe088fa6880b652734c48ae67f16 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 15 Apr 2015 11:43:39 +0100 Subject: [PATCH] Optional: put the bool m_valid after the content to improve packing --- src/optional.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/optional.hh b/src/optional.hh index a72e1555..57147b43 100644 --- a/src/optional.hh +++ b/src/optional.hh @@ -78,8 +78,8 @@ public: private: void destruct_ifn() { if (m_valid) m_value.~T(); } - bool m_valid; union { T m_value; }; + bool m_valid; }; }