From 8d080c6c58726269cf55aedd64aa239f7d098fc7 Mon Sep 17 00:00:00 2001 From: Georgy Guminov Date: Sat, 25 Jan 2025 10:27:32 +0300 Subject: [PATCH] Remove more workarounds. --- include/boost/iterator/advance.hpp | 10 --- include/boost/iterator/detail/config_def.hpp | 38 +---------- .../boost/iterator/detail/config_undef.hpp | 2 +- .../detail/facade_iterator_category.hpp | 8 +-- .../iterator/detail/minimum_category.hpp | 19 ------ include/boost/iterator/filter_iterator.hpp | 12 +--- include/boost/iterator/indirect_iterator.hpp | 14 ---- include/boost/iterator/interoperable.hpp | 5 -- include/boost/iterator/is_lvalue_iterator.hpp | 18 +----- .../boost/iterator/is_readable_iterator.hpp | 23 ++----- include/boost/iterator/iterator_adaptor.hpp | 3 +- .../boost/iterator/iterator_categories.hpp | 7 -- include/boost/iterator/iterator_facade.hpp | 64 ------------------- include/boost/iterator/new_iterator_tests.hpp | 15 +---- include/boost/iterator/transform_iterator.hpp | 16 ----- include/boost/iterator/zip_iterator.hpp | 3 +- test/indirect_iterator_test.cpp | 3 +- test/is_lvalue_iterator.cpp | 9 --- test/is_readable_iterator.cpp | 3 - test/iterator_adaptor_test.cpp | 26 +------- test/transform_iterator_test.cpp | 10 --- 21 files changed, 22 insertions(+), 286 deletions(-) delete mode 100644 include/boost/iterator/detail/minimum_category.hpp diff --git a/include/boost/iterator/advance.hpp b/include/boost/iterator/advance.hpp index 2b74256..f20e159 100644 --- a/include/boost/iterator/advance.hpp +++ b/include/boost/iterator/advance.hpp @@ -29,12 +29,6 @@ namespace iterators { } } -#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600) -// type-limits warning issued below when n is an unsigned integral -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" -#endif - template inline BOOST_CXX14_CONSTEXPR void advance_impl( @@ -57,10 +51,6 @@ namespace iterators { } } -#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600) -#pragma GCC diagnostic pop -#endif - template inline BOOST_CXX14_CONSTEXPR void advance_impl( diff --git a/include/boost/iterator/detail/config_def.hpp b/include/boost/iterator/detail/config_def.hpp index 75d2198..06029e5 100644 --- a/include/boost/iterator/detail/config_def.hpp +++ b/include/boost/iterator/detail/config_def.hpp @@ -26,8 +26,7 @@ // libs/iterator/test/constant_iterator_arrow.cpp fails to compile // because the operator-> return is improperly deduced as a non-const // pointer. -#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x531)) +#if 1 // Recall that in general, compilers without partial specialization // can't strip constness. Consider counting_iterator, which normally @@ -46,39 +45,4 @@ #endif -#if (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ - || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) - -# define BOOST_NO_LVALUE_RETURN_DETECTION - -# if 0 // test code - struct v {}; - - typedef char (&no)[3]; - - template - no foo(T const&, ...); - - template - char foo(T&, int); - - - struct value_iterator - { - v operator*() const; - }; - - template - struct lvalue_deref_helper - { - static T& x; - enum { value = (sizeof(foo(*x,0)) == 1) }; - }; - - int z2[(lvalue_deref_helper::value == 1) ? 1 : -1]; - int z[(lvalue_deref_helper::value) == 1 ? -1 : 1 ]; -# endif - -#endif - // no include guard; multiple inclusion intended diff --git a/include/boost/iterator/detail/config_undef.hpp b/include/boost/iterator/detail/config_undef.hpp index 6a0c3ab..aca964b 100644 --- a/include/boost/iterator/detail/config_undef.hpp +++ b/include/boost/iterator/detail/config_undef.hpp @@ -11,7 +11,7 @@ // 23/02/03 thw // -#undef BOOST_NO_LVALUE_RETURN_DETECTION +#undef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY #ifdef BOOST_ITERATOR_CONFIG_DEF # undef BOOST_ITERATOR_CONFIG_DEF diff --git a/include/boost/iterator/detail/facade_iterator_category.hpp b/include/boost/iterator/detail/facade_iterator_category.hpp index 7bac8d6..f3f5848 100644 --- a/include/boost/iterator/detail/facade_iterator_category.hpp +++ b/include/boost/iterator/detail/facade_iterator_category.hpp @@ -77,7 +77,7 @@ struct iterator_writability_disabled template struct iterator_facade_default_category : mpl::eval_if< - conjunction< + detail::conjunction< std::is_reference , std::is_convertible > @@ -90,8 +90,8 @@ struct iterator_facade_default_category , std::forward_iterator_tag > > - , typename mpl::eval_if< - conjunction< + , mpl::eval_if< + detail::conjunction< std::is_convertible // check for readability @@ -143,9 +143,7 @@ struct iterator_category_with_traversal static_assert(is_iterator_category::value, "Category must be an STL iterator category."); static_assert(!is_iterator_category::value, "Traversal must not be an STL iterator category."); static_assert(!is_iterator_traversal::value, "Category must not be a traversal tag."); -# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) static_assert(is_iterator_traversal::value, "Traversal must be a traversal tag."); -# endif }; // Computes an iterator_category tag whose traversal is Traversal and diff --git a/include/boost/iterator/detail/minimum_category.hpp b/include/boost/iterator/detail/minimum_category.hpp deleted file mode 100644 index 748c0d3..0000000 --- a/include/boost/iterator/detail/minimum_category.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright David Abrahams 2003. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef MINIMUM_CATEGORY_DWA20031119_HPP -# define MINIMUM_CATEGORY_DWA20031119_HPP - -# include - -namespace boost { - -// This import below (as well as the whole header) is for backward compatibility -// with boost/token_iterator.hpp. It should be removed as soon as that header is fixed. -namespace detail { -using iterators::minimum_category; -} // namespace detail - -} // namespace boost - -#endif // MINIMUM_CATEGORY_DWA20031119_HPP diff --git a/include/boost/iterator/filter_iterator.hpp b/include/boost/iterator/filter_iterator.hpp index 34549a8..133fffe 100644 --- a/include/boost/iterator/filter_iterator.hpp +++ b/include/boost/iterator/filter_iterator.hpp @@ -11,9 +11,7 @@ #include #include - -#include -#include +#include namespace boost { namespace iterators { @@ -64,13 +62,9 @@ namespace iterators { filter_iterator(Iterator x, Iterator end_ = Iterator()) : super_t(static_cast(x)), m_predicate(), m_end(static_cast(end_)) { - // Pro8 is a little too aggressive about instantiating the - // body of this function. -#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // Don't allow use of this constructor if Predicate is a // function pointer type, since it will be 0. static_assert(std::is_class::value, "Predicate must be a class."); -#endif satisfy_predicate(); } @@ -120,7 +114,7 @@ namespace iterators { inline filter_iterator make_filter_iterator( typename std::enable_if< - is_class::value + std::is_class::value , Iterator >::type x , Iterator end = Iterator()) @@ -135,6 +129,4 @@ using iterators::make_filter_iterator; } // namespace boost -#undef BOOST_ITERATOR_DETAIL_MOVE - #endif // BOOST_FILTER_ITERATOR_23022003THW_HPP diff --git a/include/boost/iterator/indirect_iterator.hpp b/include/boost/iterator/indirect_iterator.hpp index ff02c42..e3ef075 100644 --- a/include/boost/iterator/indirect_iterator.hpp +++ b/include/boost/iterator/indirect_iterator.hpp @@ -21,14 +21,6 @@ #include #include -#ifdef BOOST_MPL_CFG_NO_HAS_XXX -# include -# include -# include -#endif - -#include // must be last #include - namespace boost { namespace iterators { @@ -106,11 +98,7 @@ namespace iterators { private: typename super_t::reference dereference() const { -# if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x5A0 ) - return const_cast(**this->base()); -# else return **this->base(); -# endif } }; @@ -135,6 +123,4 @@ using iterators::make_indirect_iterator; } // namespace boost -#include - #endif // BOOST_INDIRECT_ITERATOR_23022003THW_HPP diff --git a/include/boost/iterator/interoperable.hpp b/include/boost/iterator/interoperable.hpp index b278eeb..5b9fd6f 100644 --- a/include/boost/iterator/interoperable.hpp +++ b/include/boost/iterator/interoperable.hpp @@ -7,10 +7,7 @@ #ifndef BOOST_INTEROPERABLE_23022003THW_HPP # define BOOST_INTEROPERABLE_23022003THW_HPP -# include - # include -# include // must appear last namespace boost { namespace iterators { @@ -41,6 +38,4 @@ using iterators::is_interoperable; } // namespace boost -# include - #endif // BOOST_INTEROPERABLE_23022003THW_HPP diff --git a/include/boost/iterator/is_lvalue_iterator.hpp b/include/boost/iterator/is_lvalue_iterator.hpp index 8dd06ef..3b52e46 100644 --- a/include/boost/iterator/is_lvalue_iterator.hpp +++ b/include/boost/iterator/is_lvalue_iterator.hpp @@ -12,16 +12,12 @@ #include #include -// should be the last #includes -#include - namespace boost { namespace iterators { namespace detail { -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION // Calling lvalue_preserver( , 0 ) returns a reference // to the expression's result if is an lvalue, or // not_an_lvalue() otherwise. @@ -33,14 +29,6 @@ namespace detail template not_an_lvalue lvalue_preserver(U const&, ...); -# define BOOST_LVALUE_PRESERVER(expr) detail::lvalue_preserver(expr,0) - -#else // BOOST_NO_LVALUE_RETURN_DETECTION - -# define BOOST_LVALUE_PRESERVER(expr) expr - -#endif // BOOST_NO_LVALUE_RETURN_DETECTION - // Guts of is_lvalue_iterator. Value is the iterator's value_type // and the result is computed in the nested rebind template. template @@ -66,7 +54,7 @@ namespace detail , value = ( sizeof( is_lvalue_iterator_impl::tester( - BOOST_LVALUE_PRESERVER(*x), 0 + detail::lvalue_preserver(*x,0), 0 ) ) == 1 ) @@ -74,8 +62,6 @@ namespace detail }; }; -#undef BOOST_LVALUE_PRESERVER - // // void specializations to handle std input and output iterators // @@ -153,6 +139,4 @@ using iterators::is_non_const_lvalue_iterator; } // namespace boost -#include - #endif // IS_LVALUE_ITERATOR_DWA2003112_HPP diff --git a/include/boost/iterator/is_readable_iterator.hpp b/include/boost/iterator/is_readable_iterator.hpp index da99a44..8d7a2c5 100644 --- a/include/boost/iterator/is_readable_iterator.hpp +++ b/include/boost/iterator/is_readable_iterator.hpp @@ -11,9 +11,6 @@ #include #include -// should be the last #include -#include - namespace boost { namespace iterators { @@ -29,19 +26,11 @@ namespace detail static char (& tester(any_conversion_eater, ...) )[2]; template - struct rebind - { - static It& x; - - BOOST_STATIC_CONSTANT( - bool - , value = ( - sizeof( - is_readable_iterator_impl::tester(*x, 1) - ) == 1 - ) - ); - }; + struct rebind : std::is_convertible< + decltype(*std::declval()) + , typename std::add_lvalue_reference::type + > + {}; }; #undef BOOST_READABLE_PRESERVER @@ -108,6 +97,4 @@ using iterators::is_readable_iterator; } // namespace boost -#include - #endif // IS_READABLE_ITERATOR_DWA2003112_HPP diff --git a/include/boost/iterator/iterator_adaptor.hpp b/include/boost/iterator/iterator_adaptor.hpp index 214c320..7106f3b 100644 --- a/include/boost/iterator/iterator_adaptor.hpp +++ b/include/boost/iterator/iterator_adaptor.hpp @@ -13,9 +13,10 @@ #include #include -#include #include +#include + namespace boost { namespace iterators { diff --git a/include/boost/iterator/iterator_categories.hpp b/include/boost/iterator/iterator_categories.hpp index d201083..34c02ef 100644 --- a/include/boost/iterator/iterator_categories.hpp +++ b/include/boost/iterator/iterator_categories.hpp @@ -6,11 +6,6 @@ #ifndef BOOST_ITERATOR_CATEGORIES_HPP # define BOOST_ITERATOR_CATEGORIES_HPP -# include -# include - -# include - # include # include # include @@ -208,6 +203,4 @@ using iterators::pure_traversal_tag; } // namespace boost -#include - #endif // BOOST_ITERATOR_CATEGORIES_HPP diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index d9b97d7..0833c10 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -27,9 +27,6 @@ #include #include -#include -#include // this goes last - namespace boost { namespace iterators { @@ -115,23 +112,6 @@ namespace iterators { , std::add_pointer , std::add_pointer >::type pointer; - -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ - || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ - || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \ - || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310) - - // To interoperate with some broken library/compiler - // combinations, user-defined iterators must be derived from - // std::iterator. It is possible to implement a standard - // library for broken compilers without this limitation. -# define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1 - - typedef - iterator - base; -# endif }; // iterators whose dereference operators reference the same value @@ -277,33 +257,6 @@ namespace iterators { writable_postfix_increment_dereference_proxy dereference_proxy; }; -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct is_non_proxy_reference_impl - { - static Reference r; - - template - static typename std::conditional< - std::is_convertible< - R const volatile* - , Value const volatile* - >::value - , char[1] - , char[2] - >::type& helper(R const&); - - BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); - }; - - template - struct is_non_proxy_reference - : std::integral_constant< - bool - , is_non_proxy_reference_impl::value - > - {}; -# else template struct is_non_proxy_reference : std::is_convertible< @@ -312,7 +265,6 @@ namespace iterators { , Value const volatile* > {}; -# endif // A metafunction to choose the result type of postfix ++ // @@ -527,12 +479,6 @@ namespace iterators { // class iterator_core_access { -# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - // Tasteless as this may seem, making all members public allows member templates - // to work in the absence of member template friends. - public: -# else - template friend class iterator_facade; template friend class detail::iterator_facade_base; @@ -573,8 +519,6 @@ namespace iterators { ) ; -# endif - template static typename Facade::reference dereference(Facade const& f) { @@ -655,12 +599,6 @@ namespace iterators { , class Difference > class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > -# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE - : public boost::iterators::detail::iterator_facade_types< - Value, CategoryOrTraversal, Reference, Difference - >::base -# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE -# endif { private: typedef boost::iterators::detail::iterator_facade_types< @@ -994,6 +932,4 @@ using iterators::iterator_facade; } // namespace boost -#include - #endif // BOOST_ITERATOR_FACADE_23022003THW_HPP diff --git a/include/boost/iterator/new_iterator_tests.hpp b/include/boost/iterator/new_iterator_tests.hpp index f2b7f71..9981b3d 100644 --- a/include/boost/iterator/new_iterator_tests.hpp +++ b/include/boost/iterator/new_iterator_tests.hpp @@ -32,14 +32,13 @@ #include #include #include -#include -#include - #include #include -#include #include +#include +#include + namespace boost { // Do separate tests for *i++ so we can treat, e.g., smart pointers, @@ -81,7 +80,6 @@ void readable_iterator_test(const Iterator i1, T v) BOOST_TEST(v1 == v); BOOST_TEST(v2 == v); -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) readable_iterator_traversal_test( i1, v, std::integral_constant< @@ -91,7 +89,6 @@ void readable_iterator_test(const Iterator i1, T v) // the above code. static_assert(is_readable_iterator::value, "Iterator must be readable."); -#endif } template @@ -99,14 +96,12 @@ void writable_iterator_test(Iterator i, T v, T v2) { Iterator i2(i); // Copy Constructible *i2 = v; -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) writable_iterator_traversal_test( i, v2, iterators::detail::conjunction< std::integral_constant::value>, std::integral_constant::value> >()); -#endif } template @@ -153,12 +148,10 @@ void non_const_lvalue_iterator_test(Iterator i, T v1, T v2) { T& v4 = *i2; BOOST_TEST(v2 == v4); -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert(is_lvalue_iterator::value, "Iterator must be an lvalue iterator."); static_assert(is_non_const_lvalue_iterator::value, "Iterator must be non-const."); -#endif } template @@ -265,6 +258,4 @@ void random_access_readable_iterator_test(Iterator i, int N, TrueVals vals) } // namespace boost -#include - #endif // BOOST_NEW_ITERATOR_TESTS_HPP diff --git a/include/boost/iterator/transform_iterator.hpp b/include/boost/iterator/transform_iterator.hpp index 512b0d0..fa10a27 100644 --- a/include/boost/iterator/transform_iterator.hpp +++ b/include/boost/iterator/transform_iterator.hpp @@ -16,8 +16,6 @@ #include #include -#include - namespace boost { namespace iterators { @@ -100,9 +98,7 @@ namespace iterators { transform_iterator( transform_iterator const& t , typename enable_if_convertible::type* = 0 -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) , typename enable_if_convertible::type* = 0 -#endif ) : super_t(t.base()), m_f(t.functor()) {} @@ -142,16 +138,6 @@ namespace iterators { { return transform_iterator(it, UnaryFunc()); } - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - template - inline transform_iterator< Return (*)(Argument), Iterator, Return> - make_transform_iterator(Iterator it, Return (*fun)(Argument)) - { - return transform_iterator(it, fun); - } -#endif - } // namespace iterators using iterators::transform_iterator; @@ -159,6 +145,4 @@ using iterators::make_transform_iterator; } // namespace boost -#include - #endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP diff --git a/include/boost/iterator/zip_iterator.hpp b/include/boost/iterator/zip_iterator.hpp index f97fb29..87695a5 100644 --- a/include/boost/iterator/zip_iterator.hpp +++ b/include/boost/iterator/zip_iterator.hpp @@ -12,17 +12,16 @@ #include #include // for enable_if_convertible #include - #include #include // for std::pair -#include // for backward compatibility #include #include #include #include +#include // for backward compatibility #include #include #include diff --git a/test/indirect_iterator_test.cpp b/test/indirect_iterator_test.cpp index a08afa8..d7b4e6d 100644 --- a/test/indirect_iterator_test.cpp +++ b/test/indirect_iterator_test.cpp @@ -37,8 +37,7 @@ #if !defined(__SGI_STL_PORT) \ && (defined(BOOST_MSVC_STD_ITERATOR) \ - || BOOST_WORKAROUND(_CPPLIB_VER, <= 310) \ - || BOOST_WORKAROUND(__GNUC__, <= 2)) + || BOOST_WORKAROUND(_CPPLIB_VER, <= 310)) // std container random-access iterators don't support mutable/const // interoperability (but may support const/mutable interop). diff --git a/test/is_lvalue_iterator.cpp b/test/is_lvalue_iterator.cpp index e523568..6a41600 100644 --- a/test/is_lvalue_iterator.cpp +++ b/test/is_lvalue_iterator.cpp @@ -8,9 +8,6 @@ #include #include -// Last, for BOOST_NO_LVALUE_RETURN_DETECTION -#include - struct v { v(); @@ -104,10 +101,8 @@ int main() "boost::is_lvalue_iterator>::value is expected to be false."); static_assert(!boost::is_lvalue_iterator>::value, "boost::is_lvalue_iterator>::value is expected to be false."); -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert(!boost::is_lvalue_iterator::value, "boost::is_lvalue_iterator::value is expected to be false."); -#endif // Make sure inaccessible copy constructor doesn't prevent // reference binding static_assert(boost::is_lvalue_iterator::value, @@ -150,19 +145,15 @@ int main() "boost::is_non_const_lvalue_iterator>::value is expected to be false."); static_assert(!boost::is_non_const_lvalue_iterator>::value, "boost::is_non_const_lvalue_iterator>::value is expected to be false."); -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert(!boost::is_non_const_lvalue_iterator::value, "boost::is_non_const_lvalue_iterator::value is expected to be false."); -#endif static_assert(!boost::is_non_const_lvalue_iterator::value, "boost::is_non_const_lvalue_iterator::value is expected to be false."); static_assert(boost::is_non_const_lvalue_iterator>::value, "boost::is_non_const_lvalue_iterator>::value is expected to be true."); -#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) static_assert(boost::is_non_const_lvalue_iterator>::value, "boost::is_non_const_lvalue_iterator>::value is expected to be true."); -#endif static_assert(boost::is_non_const_lvalue_iterator>::value, "boost::is_non_const_lvalue_iterator>::value is expected to be true."); static_assert(boost::is_non_const_lvalue_iterator>::value, diff --git a/test/is_readable_iterator.cpp b/test/is_readable_iterator.cpp index 5e929ee..d25d060 100644 --- a/test/is_readable_iterator.cpp +++ b/test/is_readable_iterator.cpp @@ -8,9 +8,6 @@ #include #include -// Last, for BOOST_NO_LVALUE_RETURN_DETECTION -#include - struct v { v(); diff --git a/test/iterator_adaptor_test.cpp b/test/iterator_adaptor_test.cpp index 4305d18..9ed8385 100644 --- a/test/iterator_adaptor_test.cpp +++ b/test/iterator_adaptor_test.cpp @@ -13,10 +13,8 @@ #include #include -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) -# include -# include -#endif +#include +#include #include # include @@ -29,8 +27,6 @@ #include "static_assert_same.hpp" -#include - using boost::dummyT; typedef std::deque storage; @@ -56,9 +52,6 @@ struct ptr_iterator , V* , V , boost::random_access_traversal_tag -#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551)) - , V& -#endif > { private: @@ -67,9 +60,6 @@ private: , V* , V , boost::random_access_traversal_tag -#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551)) - , V& -#endif > super_t; public: @@ -208,12 +198,10 @@ main() test = static_assert_same::value; test = static_assert_same::value; test = static_assert_same::value; -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) static_assert( std::is_convertible::value, "Iterator must have a random access category." ); -#endif } { @@ -222,16 +210,10 @@ main() test = static_assert_same::value; test = static_assert_same::value; -#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) static_assert(boost::is_readable_iterator::value, "Iter1 is expected to be readable."); -# ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert(boost::is_lvalue_iterator::value, "Iter1 is expected to be lvalue iterator."); -# endif -#endif -#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // borland drops constness test = static_assert_same::value; -#endif } { @@ -241,11 +223,8 @@ main() test = static_assert_same::value; test = static_assert_same::value; -#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // borland drops constness test = static_assert_same::value; -#endif -#ifndef BOOST_NO_LVALUE_RETURN_DETECTION static_assert( boost::is_non_const_lvalue_iterator::value, "boost::is_non_const_lvalue_iterator::value is expected to be true." @@ -254,7 +233,6 @@ main() boost::is_lvalue_iterator::value, "boost::is_lvalue_iterator::value is expected to be true." ); -#endif typedef modify_traversal IncrementableIter; diff --git a/test/transform_iterator_test.cpp b/test/transform_iterator_test.cpp index 5b15f4f..d9b8a66 100644 --- a/test/transform_iterator_test.cpp +++ b/test/transform_iterator_test.cpp @@ -23,16 +23,6 @@ #include "static_assert_same.hpp" -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -namespace boost { namespace detail -{ - template<> struct function_object_result - { - typedef int type; - }; -}} -#endif - struct mult_functor { // Functors used with transform_iterator must be // DefaultConstructible, as the transform_iterator must be