diff --git a/include/boost/optional.hpp b/include/boost/optional.hpp index 69317ad..21d52d8 100644 --- a/include/boost/optional.hpp +++ b/include/boost/optional.hpp @@ -426,7 +426,7 @@ class optional : public optional_detail::optional_base // No-throw (assuming T::~T() doesn't) ~optional() {} -#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT +#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 template diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 413d65b..39fd5ed 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -14,21 +14,26 @@ import testing ; +project + : source-location $(BOOST_ROOT) + ; { test-suite optional : - [ run optional_test.cpp ] - [ run optional_test_tie.cpp ] - [ run optional_test_ref.cpp ] - [ run optional_test_inplace.cpp ] - [ compile-fail optional_test_fail1.cpp ] - [ compile-fail optional_test_fail2.cpp ] - [ compile-fail optional_test_fail3a.cpp ] - [ compile-fail optional_test_fail3b.cpp ] - [ compile-fail optional_test_ref_fail1.cpp ] - [ compile-fail optional_test_ref_fail2.cpp ] - [ compile-fail optional_test_ref_fail3.cpp ] - [ compile-fail optional_test_ref_fail4.cpp ] - [ compile-fail optional_test_inplace_fail.cpp ] - [ compile-fail optional_test_inplace_fail2.cpp ] + [ run libs/optional/test/optional_test.cpp ] + [ run libs/optional/test/optional_test_tie.cpp ] + [ run libs/optional/test/optional_test_references.cpp ] + [ run libs/optional/test/optional_test_inplace.cpp ] + [ compile-fail libs/optional/test/optional_test_fail1.cpp ] + [ compile-fail libs/optional/test/optional_test_fail2.cpp ] + [ compile-fail libs/optional/test/optional_test_fail3a.cpp ] + [ compile-fail libs/optional/test/optional_test_fail3b.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail1a.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail1b.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail1c.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail2.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail3.cpp ] + [ compile-fail libs/optional/test/optional_test_references_fail4.cpp ] + [ compile-fail libs/optional/test/optional_test_inplace_fail.cpp ] + [ compile-fail libs/optional/test/optional_test_inplace_fail2.cpp ] ; } diff --git a/test/optional_test.cpp b/test/optional_test.cpp index 41bbe4b..9ef3874 100644 --- a/test/optional_test.cpp +++ b/test/optional_test.cpp @@ -485,21 +485,12 @@ void test_throwing_assign_to_initialized( T const* ) BOOST_CHECK(!passed); - -#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION - // opt0 was left unmodified - check_is_pending_dtor( ARG(T) ); - check_is_not_pending_copy( ARG(T) ); - check_instance_count(count, ARG(T) ); - check_initialized(opt0); -#else // opt0 was left uninitialized -- count ; check_is_not_pending_dtor( ARG(T) ); check_is_not_pending_copy( ARG(T) ); check_instance_count(count, ARG(T) ); check_uninitialized(opt0); -#endif } //