re-added explicit optional destructor

If it is not there T::~T() is never called in buggy msvc-8.0.
This commit is contained in:
Andrzej Krzemieński
2016-02-18 09:16:59 +01:00
parent c653372524
commit 630fbb7973

View File

@ -678,7 +678,9 @@ class optional : public optional_detail::optional_base<T>
{}
#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