diff --git a/include/boost/iterator/detail/config_def.hpp b/include/boost/iterator/detail/config_def.hpp index e9861ef76..dd0c96d09 100644 --- a/include/boost/iterator/detail/config_def.hpp +++ b/include/boost/iterator/detail/config_def.hpp @@ -109,11 +109,6 @@ #endif - -#if !defined(BOOST_MSVC) && (defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)) -# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY -#endif - # if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion diff --git a/include/boost/iterator/detail/config_undef.hpp b/include/boost/iterator/detail/config_undef.hpp index a32529c02..b1ebc658b 100644 --- a/include/boost/iterator/detail/config_undef.hpp +++ b/include/boost/iterator/detail/config_undef.hpp @@ -13,7 +13,6 @@ #undef BOOST_NO_IS_CONVERTIBLE #undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE -#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY #undef BOOST_NO_LVALUE_RETURN_DETECTION #undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 8a0853642..292fcb9d9 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -433,9 +433,7 @@ namespace iterators { struct use_operator_brackets_proxy : detail::negation< detail::conjunction< - // Really we want an is_copy_constructible trait here, - // but is_POD will have to suffice in the meantime. - std::is_standard_layout + std::is_copy_constructible , std::is_trivial , iterator_writability_disabled > @@ -497,17 +495,6 @@ namespace iterators { // Macros which describe the declarations of binary operators -# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY -# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ - template < \ - class Derived1, class V1, class TC1, class Reference1, class Difference1 \ - , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ - > \ - prefix typename mpl::apply2::type \ - operator op( \ - iterator_facade const& lhs \ - , iterator_facade const& rhs) -# else # define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ template < \ class Derived1, class V1, class TC1, class Reference1, class Difference1 \ @@ -520,7 +507,6 @@ namespace iterators { operator op( \ iterator_facade const& lhs \ , iterator_facade const& rhs) -# endif # define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable) @@ -931,11 +917,6 @@ namespace iterators { # define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \ BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \ { \ - /* For those compilers that do not support enable_if */ \ - static_assert( \ - is_interoperable::value, \ - "Derived1 & Derived2 types must be interoperable." \ - ); \ return_prefix iterator_core_access::base_op( \ *static_cast(&lhs) \ , *static_cast(&rhs) \ @@ -961,16 +942,6 @@ namespace iterators { BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \ { \ using boost::iterators::detail::is_traversal_at_least; \ - typedef typename iterator_category::type Derived1IterCat; \ - typedef typename iterator_category::type Derived2IterCat; \ - /* For those compilers that do not support enable_if */ \ - static_assert( \ - is_interoperable::value && \ - is_traversal_at_least::value && \ - is_traversal_at_least::value, \ - "Derived1 & Derived2 types must be interoperable and must both have " \ - "random_access_traversal_tag." \ - ); \ return_prefix iterator_core_access::base_op( \ *static_cast(&lhs) \ , *static_cast(&rhs) \ diff --git a/include/boost/iterator/minimum_category.hpp b/include/boost/iterator/minimum_category.hpp index 58fa2759e..913cec43e 100644 --- a/include/boost/iterator/minimum_category.hpp +++ b/include/boost/iterator/minimum_category.hpp @@ -44,7 +44,7 @@ struct minimum_category_impl { static_assert( std::is_same::value, - "Types must be same when they are convertible to each other." + "Iterator category types must be the same when they are equivalent." ); typedef T1 type; }; diff --git a/include/boost/iterator/new_iterator_tests.hpp b/include/boost/iterator/new_iterator_tests.hpp index 90fde100c..a8a833517 100644 --- a/include/boost/iterator/new_iterator_tests.hpp +++ b/include/boost/iterator/new_iterator_tests.hpp @@ -123,10 +123,9 @@ void constant_lvalue_iterator_test(Iterator i, T v1) { const T &v2 = *i2; BOOST_TEST(v1 == v2); #ifndef BOOST_NO_LVALUE_RETURN_DETECTION - static_assert(is_lvalue_iterator::value, - "Iterator must be lvalue."); - static_assert(!is_non_const_lvalue_iterator::value, - "Iterator must be const."); + static_assert(is_lvalue_iterator::value + && !is_non_const_lvalue_iterator::value, + "Iterator must be a const lvalue iterator."); #endif } @@ -149,7 +148,7 @@ void non_const_lvalue_iterator_test(Iterator i, T v1, T v2) { BOOST_TEST(v2 == v4); #ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert(is_lvalue_iterator::value, - "Iterator must be lvalue."); + "Iterator must be an lvalue iterator."); static_assert(is_non_const_lvalue_iterator::value, "Iterator must be non-const."); #endif diff --git a/test/indirect_iter_member_types.cpp b/test/indirect_iter_member_types.cpp index dffe68c07..86b893fa3 100644 --- a/test/indirect_iter_member_types.cpp +++ b/test/indirect_iter_member_types.cpp @@ -40,7 +40,7 @@ int main() static_assert(std::is_convertible::value, - "Iter must have an STL random_access_iterator_tag."); + "Iter must have a random access category."); static_assert(std::is_convertible::type, boost::random_access_traversal_tag>::value, "Iter must have a random_access_traversal_tag."); @@ -73,7 +73,7 @@ int main() static_assert(std::is_convertible::value, - "Iter must have an STL random_access_iterator_tag."); + "Iter must have a random access category."); static_assert(std::is_convertible::type, boost::random_access_traversal_tag>::value, "Iter must have a random_access_traversal_tag.");