From 931cf3941b073043909d9cb909563fcdd2ad0dcd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 30 Sep 2013 00:17:11 +0000 Subject: [PATCH] Optional: Remove obsolete MSVC version checks. [SVN r86019] --- include/boost/optional/optional.hpp | 32 +++-------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 7c65962..062a86f 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -39,31 +39,10 @@ #include -#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) -// VC6.0 has the following bug: -// When a templated assignment operator exist, an implicit conversion -// constructing an optional is used when assigment of the form: -// optional opt ; opt = T(...); -// is compiled. -// However, optional's ctor is _explicit_ and the assignemt shouldn't compile. -// Therefore, for VC6.0 templated assignment is disabled. -// -#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -// VC7.0 has the following bug: -// When both a non-template and a template copy-ctor exist -// and the templated version is made 'explicit', the explicit is also -// given to the non-templated version, making the class non-implicitely-copyable. -// -#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) -// AFAICT only VC7.1 correctly resolves the overload set +#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) +// AFAICT only Intel 7 correctly resolves the overload set // that includes the in-place factory taking functions, -// so for the other VC versions, in-place factory support +// so for the other icc versions, in-place factory support // is disabled #define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #endif @@ -530,7 +509,6 @@ class optional : public optional_detail::optional_base // Can throw if T::T(T const&) does optional ( bool cond, argument_type val ) : base(cond,val) {} -#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR // NOTE: MSVC needs templated versions first // Creates a deep copy of another convertible optional @@ -544,7 +522,6 @@ class optional : public optional_detail::optional_base if ( rhs.is_initialized() ) this->construct(rhs.get()); } -#endif #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT // Creates an optional with an expression which can be either @@ -578,8 +555,6 @@ class optional : public optional_detail::optional_base } #endif - -#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT // Assigns from another convertible optional (converts && deep-copies the rhs value) // Requires a valid conversion from U to T. // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED @@ -589,7 +564,6 @@ class optional : public optional_detail::optional_base this->assign(rhs); return *this ; } -#endif // Assigns from another optional (deep-copies the rhs value) // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED