From 3db413cc3047ebe1cd60092f537be0a293f8c7ea Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Fri, 16 Jul 2004 14:42:25 +0000 Subject: [PATCH] Pseudo-destructor fixed (fix adjusted for BCB6) [SVN r23632] --- include/boost/optional/optional.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 03d5fd4..3a34f41 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -347,7 +347,12 @@ class optional_base : public optional_tag reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564) + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } +#else void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } +#endif + void destroy_impl ( is_reference_tag ) { m_initialized = false ; } // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.