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.