From 630fbb7973e105c85656bafc37a5173a4a5aa5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Krzemie=C5=84ski?= Date: Thu, 18 Feb 2016 09:16:59 +0100 Subject: [PATCH] re-added explicit optional destructor If it is not there T::~T() is never called in buggy msvc-8.0. --- include/boost/optional/optional.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 2af9150..9d20282 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -678,7 +678,9 @@ class optional : public optional_detail::optional_base {} #endif - + // I need this declaration for msvc-8.0 (otherwise, T::~T() is never called) + ~optional() {} + #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) // Assigns from an expression. See corresponding constructor. // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED