From f8fe66e28996d7eb34137157c9c67f85c4dc586f Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Fri, 7 Nov 2003 14:57:30 +0000 Subject: [PATCH] Still mre bcc5.5.1 compat fixes [SVN r20727] --- include/boost/optional.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/boost/optional.hpp b/include/boost/optional.hpp index e489437..6096bcb 100644 --- a/include/boost/optional.hpp +++ b/include/boost/optional.hpp @@ -70,10 +70,8 @@ #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551) -// BCB (5.5.1) defines BOOST_NESTED_TEMPLATE as 'template' but in this context it produces an error. -#define BOOST_OPTIONAL_NESTED_TEMPLATE -#else -#define BOOST_OPTIONAL_NESTED_TEMPLATE BOOST_NESTED_TEMPLATE +// BCB (5.5.1) cannot parse the nested template struct in an inplace factory. +#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #endif namespace boost { @@ -213,7 +211,7 @@ class optional_base : public optional_tag if ( rhs.is_initialized() ) construct(rhs.get_impl()); } - + // Assigns from a T (deep-copies the rhs value) // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED void assign ( argument_type val ) @@ -267,7 +265,7 @@ class optional_base : public optional_tag void construct ( Expr const& factory, InPlaceFactoryBase const* ) { BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; - factory.BOOST_OPTIONAL_NESTED_TEMPLATE apply(m_storage.address()) ; + factory.BOOST_NESTED_TEMPLATE apply(m_storage.address()) ; m_initialized = true ; } @@ -706,8 +704,6 @@ template inline void swap ( optional& x, optional& y ) optional_detail::optional_swap(x,y); } -#undef BOOST_OPTIONAL_NESTED_TEMPLATE - } // namespace boost #endif