From 11dd528eb0a6dbcb9365baefe249372a2252846f Mon Sep 17 00:00:00 2001 From: Christopher Wecht Date: Sun, 1 Apr 2018 19:43:15 +0200 Subject: [PATCH 01/17] added unique_erase --- include/boost/range/algorithm_ext/erase.hpp | 21 ++++++++ test/algorithm_ext_test/erase.cpp | 60 +++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/include/boost/range/algorithm_ext/erase.hpp b/include/boost/range/algorithm_ext/erase.hpp index 107d32b..1b47f9b 100644 --- a/include/boost/range/algorithm_ext/erase.hpp +++ b/include/boost/range/algorithm_ext/erase.hpp @@ -52,10 +52,31 @@ inline Container& remove_erase_if( Container& on, Pred pred ) return on; } +template< class Container > +inline Container& unique_erase( Container& on) +{ + BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); + on.erase( + std::unique(boost::begin(on), boost::end(on)), + boost::end(on)); + return on; +} + +template< class Container, class Pred > +inline Container& unique_erase( Container& on, Pred pred ) +{ + BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); + on.erase( + std::unique(boost::begin(on), boost::end(on), pred), + boost::end(on)); + return on; +} + } // namespace range using range::erase; using range::remove_erase; using range::remove_erase_if; + using range::unique_erase; } // namespace boost #endif // include guard diff --git a/test/algorithm_ext_test/erase.cpp b/test/algorithm_ext_test/erase.cpp index 3bdf2da..73de043 100644 --- a/test/algorithm_ext_test/erase.cpp +++ b/test/algorithm_ext_test/erase.cpp @@ -112,6 +112,64 @@ namespace test_remove_erase_if_impl >(); } + template< class Container > + void test_unique_erase_impl() + { + Container source; + source.push_back(1); + source.push_back(1); + source.push_back(1); + source.push_back(2); + source.push_back(3); + source.push_back(3); + + Container reference; + reference.push_back(1); + reference.push_back(2); + reference.push_back(3); + + boost::unique_erase(source); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + source.begin(), source.end() ); + } + + void test_unique_erase() + { + test_unique_erase_impl >(); + test_unique_erase_impl >(); + } + + struct distance_smaller_2 + { + typedef bool result_type; + typedef int argument_type; + bool operator()(int x, int y) const { return std::abs(x - y) < 2; } + }; + + template< class Container > + void test_unique_erase_pred_impl() + { + Container source; + for (int i = 0; i < 10; ++i) + source.push_back(i); + + Container reference; + for (int i = 0; i < 10; i += 2) + reference.push_back(i); + + + boost::unique_erase(source, distance_smaller_2()); + + BOOST_CHECK_EQUAL_COLLECTIONS( reference.begin(), reference.end(), + source.begin(), source.end() ); + } + + void test_unique_erase_pred() + { + test_unique_erase_pred_impl >(); + test_unique_erase_pred_impl >(); + } } boost::unit_test::test_suite* @@ -123,6 +181,8 @@ init_unit_test_suite(int argc, char* argv[]) test->add( BOOST_TEST_CASE( &test_erase ) ); test->add( BOOST_TEST_CASE( &test_remove_erase ) ); test->add( BOOST_TEST_CASE( &test_remove_erase_if ) ); + test->add( BOOST_TEST_CASE( &test_unique_erase ) ); + test->add( BOOST_TEST_CASE( &test_unique_erase_pred ) ); return test; } From 221ae46c2b9b48182542016505d6e03005c40512 Mon Sep 17 00:00:00 2001 From: cekc <31835620+cekc@users.noreply.github.com> Date: Mon, 25 Feb 2019 18:35:53 +0300 Subject: [PATCH 02/17] add std::tuple_element and std::tuple_size specializations for index_value To make index_value work with structured bindings https://wandbox.org/permlink/gsveiKdAamnEbOKM --- include/boost/range/adaptor/indexed.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/boost/range/adaptor/indexed.hpp b/include/boost/range/adaptor/indexed.hpp index a426bd6..8fd0289 100644 --- a/include/boost/range/adaptor/indexed.hpp +++ b/include/boost/range/adaptor/indexed.hpp @@ -367,4 +367,29 @@ index( } // namespace adaptors } // namespace boost +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) + +namespace std { + +#if defined(BOOST_CLANG) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmismatched-tags" +#endif + +template +struct tuple_element>: + boost::tuples::element> {}; + +template +struct tuple_size>: + std::integral_constant {}; + +#if defined(BOOST_CLANG) +#pragma clang diagnostic pop +#endif + +} // namespace std + +#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE) + #endif // include guard From dbb6ef424f6b6dd66a59176bb1205a0d6aacaf6f Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Tue, 7 May 2019 12:06:05 +0200 Subject: [PATCH 03/17] Fix any_range with non-reference references can cause UB --- .../range/detail/any_iterator_interface.hpp | 26 ++++---- test/Jamfile.v2 | 1 + test/adaptor_test/type_erased_transformed.cpp | 66 +++++++++++++++++++ 3 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 test/adaptor_test/type_erased_transformed.cpp diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index cd56714..9310038 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -35,15 +36,18 @@ namespace boost }; template - struct mutable_reference_type_generator + struct reference_as_value_type_generator { typedef typename mpl::if_< - typename mpl::and_< - typename is_const::type, - typename mpl::not_::type>::type + typename is_copy_constructible< + typename remove_const< + typename remove_reference::type + >::type >::type, - T, - typename add_reference::type + typename remove_const< + typename remove_reference::type + >::type, + T >::type type; }; @@ -53,16 +57,12 @@ namespace boost > struct any_incrementable_iterator_interface { - typedef typename mutable_reference_type_generator< - Reference - >::type reference; - + typedef Reference reference; typedef typename const_reference_type_generator< Reference >::type const_reference; - - typedef typename remove_const< - typename remove_reference::type + typedef typename reference_as_value_type_generator< + Reference >::type reference_as_value_type; typedef Buffer buffer_type; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index b195926..cd2774e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -81,6 +81,7 @@ test-suite range : [ range-test adaptor_test/type_erased_forward ] [ range-test adaptor_test/type_erased_bidirectional ] [ range-test adaptor_test/type_erased_random_access ] + [ range-test adaptor_test/type_erased_transformed ] [ range-test adaptor_test/uniqued ] [ range-test adaptor_test/adjacent_filtered_example ] [ range-test adaptor_test/copied_example ] diff --git a/test/adaptor_test/type_erased_transformed.cpp b/test/adaptor_test/type_erased_transformed.cpp new file mode 100644 index 0000000..936d432 --- /dev/null +++ b/test/adaptor_test/type_erased_transformed.cpp @@ -0,0 +1,66 @@ +// Boost.Range library +// +// Copyright Neil Groves 2014. 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) +// +#include +#include +#include +#include "type_erased_test.hpp" + +#include + +#include + +namespace boost_range_adaptor_type_erased_test +{ + namespace + { + +typedef boost::any_range< + int, + boost::random_access_traversal_tag, + int, + std::ptrdiff_t +> any_integer_value_range; + +struct get_fn +{ + boost::int32_t operator()(const MockType& val) const + { + return val.get(); + } +}; + +int accumulate_any_integer_value_range(any_integer_value_range rng) +{ + return boost::accumulate(rng, 0); +} + +void test_type_erased_transformed() +{ + std::vector v{1,2,3,4,5}; + + const int sum = accumulate_any_integer_value_range( + v | boost::adaptors::transformed(get_fn())); + + BOOST_CHECK_EQUAL(15, sum); +} + + } // anonymous namespace +} // namespace boost_range_adaptor_type_erased_test + +boost::unit_test::test_suite* +init_unit_test_suite(int, char*[]) +{ + boost::unit_test::test_suite* test + = BOOST_TEST_SUITE("RangeTestSuite.adaptor.type_erased_transformed"); + + test->add( + BOOST_TEST_CASE( + &boost_range_adaptor_type_erased_test::test_type_erased_transformed)); + + return test; +} From ce24356018eb522840d075c8a81e98b44bdd18e9 Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Tue, 7 May 2019 15:03:56 +0200 Subject: [PATCH 04/17] Replace is_copy_constructible with is_abstract (for pre C++11) --- include/boost/range/detail/any_iterator_interface.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 9310038..38b307f 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -39,15 +39,15 @@ namespace boost struct reference_as_value_type_generator { typedef typename mpl::if_< - typename is_copy_constructible< + typename is_abstract< typename remove_const< typename remove_reference::type >::type >::type, + T, typename remove_const< typename remove_reference::type - >::type, - T + >::type >::type type; }; From 3496282d3bb6b088348f199434067f4f8f99808c Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Tue, 7 May 2019 17:01:02 +0200 Subject: [PATCH 05/17] Remove usage of initializer_list in test --- test/adaptor_test/type_erased_transformed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/adaptor_test/type_erased_transformed.cpp b/test/adaptor_test/type_erased_transformed.cpp index 936d432..20a8696 100644 --- a/test/adaptor_test/type_erased_transformed.cpp +++ b/test/adaptor_test/type_erased_transformed.cpp @@ -41,7 +41,7 @@ int accumulate_any_integer_value_range(any_integer_value_range rng) void test_type_erased_transformed() { - std::vector v{1,2,3,4,5}; + std::vector v(5, MockType(3)); const int sum = accumulate_any_integer_value_range( v | boost::adaptors::transformed(get_fn())); From 911d8a427d05b1665910267fd6bdd715bad0e14f Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Tue, 7 May 2019 17:17:50 +0200 Subject: [PATCH 06/17] Add result_type typedef in tests --- test/adaptor_test/type_erased_transformed.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/adaptor_test/type_erased_transformed.cpp b/test/adaptor_test/type_erased_transformed.cpp index 20a8696..1b38261 100644 --- a/test/adaptor_test/type_erased_transformed.cpp +++ b/test/adaptor_test/type_erased_transformed.cpp @@ -28,6 +28,7 @@ typedef boost::any_range< struct get_fn { + typedef boost::int32_t result_type; boost::int32_t operator()(const MockType& val) const { return val.get(); From 9f03cc44d8f7d228d4fe4dcdcedc0435c6413e98 Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Wed, 8 May 2019 09:58:37 +0200 Subject: [PATCH 07/17] Add is_copy_constructible for >= C++11 --- .../range/detail/any_iterator_interface.hpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 38b307f..6c218e8 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -12,9 +12,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -38,16 +40,17 @@ namespace boost template struct reference_as_value_type_generator { + typedef typename remove_const< + typename remove_reference::type + >::type const_reference_stripped_type; + typedef typename mpl::if_< - typename is_abstract< - typename remove_const< - typename remove_reference::type - >::type + typename mpl::or_< + mpl::not_::type>, + typename is_copy_constructible::type >::type, - T, - typename remove_const< - typename remove_reference::type - >::type + const_reference_stripped_type, + T >::type type; }; From 1bf2db29c0f2fc019778a027ecdbe74d59a83078 Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Wed, 8 May 2019 17:21:45 +0200 Subject: [PATCH 08/17] Replace is_copy_constructible and is_abstract with is_convertible --- .../range/detail/any_iterator_interface.hpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 6c218e8..6135474 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -13,12 +13,9 @@ #include #include #include -#include -#include -#include -#include +#include +#include #include -#include #include namespace boost @@ -40,16 +37,11 @@ namespace boost template struct reference_as_value_type_generator { - typedef typename remove_const< - typename remove_reference::type - >::type const_reference_stripped_type; + typedef typename decay::type decayed_type; typedef typename mpl::if_< - typename mpl::or_< - mpl::not_::type>, - typename is_copy_constructible::type - >::type, - const_reference_stripped_type, + typename is_convertible::type, + decayed_type, T >::type type; }; From 6b3750f209ffdcbfe7018566250731cea0c55fbb Mon Sep 17 00:00:00 2001 From: Max Jendruk Date: Wed, 8 May 2019 22:43:09 +0200 Subject: [PATCH 09/17] Remove unused include --- include/boost/range/detail/any_iterator_interface.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 6135474..893a09b 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include From 21a06a93aa62f30bf2962d2fcf5900f6fa1e93bd Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Fri, 31 May 2019 10:46:04 +0200 Subject: [PATCH 10/17] Replace decay with remove_reference / remove_const --- include/boost/range/detail/any_iterator_interface.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/boost/range/detail/any_iterator_interface.hpp b/include/boost/range/detail/any_iterator_interface.hpp index 6135474..d3b21ea 100644 --- a/include/boost/range/detail/any_iterator_interface.hpp +++ b/include/boost/range/detail/any_iterator_interface.hpp @@ -13,9 +13,9 @@ #include #include #include -#include #include #include +#include #include namespace boost @@ -37,11 +37,13 @@ namespace boost template struct reference_as_value_type_generator { - typedef typename decay::type decayed_type; + typedef typename remove_reference< + typename remove_const::type + >::type value_type; typedef typename mpl::if_< - typename is_convertible::type, - decayed_type, + typename is_convertible::type, + value_type, T >::type type; }; From 5f0423114499047797391bb388bee86b4d6106c1 Mon Sep 17 00:00:00 2001 From: "code@jendruk.com" Date: Fri, 31 May 2019 16:06:46 +0200 Subject: [PATCH 11/17] Make lower_bound and upper_bound take argument by const reference --- include/boost/range/algorithm/lower_bound.hpp | 16 ++++++++-------- include/boost/range/algorithm/upper_bound.hpp | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/boost/range/algorithm/lower_bound.hpp b/include/boost/range/algorithm/lower_bound.hpp index cb5e639..23dac6c 100644 --- a/include/boost/range/algorithm/lower_bound.hpp +++ b/include/boost/range/algorithm/lower_bound.hpp @@ -31,7 +31,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_iterator::type >::type -lower_bound( ForwardRange& rng, Value val ) +lower_bound( ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::lower_bound(boost::begin(rng), boost::end(rng), val); @@ -40,7 +40,7 @@ lower_bound( ForwardRange& rng, Value val ) /// \overload template< class ForwardRange, class Value > inline BOOST_DEDUCED_TYPENAME range_iterator::type -lower_bound( const ForwardRange& rng, Value val ) +lower_bound( const ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::lower_bound(boost::begin(rng), boost::end(rng), val); @@ -52,7 +52,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_iterator::type >::type -lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) +lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); @@ -61,7 +61,7 @@ lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) /// \overload template< class ForwardRange, class Value, class SortPredicate > inline BOOST_DEDUCED_TYPENAME range_iterator::type -lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); @@ -73,7 +73,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_return::type >::type -lower_bound( ForwardRange& rng, Value val ) +lower_bound( ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -84,7 +84,7 @@ lower_bound( ForwardRange& rng, Value val ) /// \overload template< range_return_value re, class ForwardRange, class Value > inline BOOST_DEDUCED_TYPENAME range_return::type -lower_bound( const ForwardRange& rng, Value val ) +lower_bound( const ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -98,7 +98,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_return::type >::type -lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) +lower_bound( ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -109,7 +109,7 @@ lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) /// \overload template< range_return_value re, class ForwardRange, class Value, class SortPredicate > inline BOOST_DEDUCED_TYPENAME range_return::type -lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +lower_bound( const ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: diff --git a/include/boost/range/algorithm/upper_bound.hpp b/include/boost/range/algorithm/upper_bound.hpp index c8acbc6..9abf4b3 100644 --- a/include/boost/range/algorithm/upper_bound.hpp +++ b/include/boost/range/algorithm/upper_bound.hpp @@ -32,7 +32,7 @@ BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_iterator::type >::type -upper_bound( ForwardRange& rng, Value val ) +upper_bound( ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::upper_bound(boost::begin(rng), boost::end(rng), val); @@ -41,7 +41,7 @@ upper_bound( ForwardRange& rng, Value val ) /// \overload template< class ForwardRange, class Value > BOOST_DEDUCED_TYPENAME range_iterator::type -upper_bound( const ForwardRange& rng, Value val ) +upper_bound( const ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::upper_bound(boost::begin(rng), boost::end(rng), val); @@ -53,7 +53,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_iterator::type >::type -upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) +upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); @@ -62,7 +62,7 @@ upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) /// \overload template< class ForwardRange, class Value, class SortPredicate > inline BOOST_DEDUCED_TYPENAME range_iterator::type -upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); @@ -74,7 +74,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_return::type >::type -upper_bound( ForwardRange& rng, Value val ) +upper_bound( ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -85,7 +85,7 @@ upper_bound( ForwardRange& rng, Value val ) /// \overload template< range_return_value re, class ForwardRange, class Value > inline BOOST_DEDUCED_TYPENAME range_return::type -upper_bound( const ForwardRange& rng, Value val ) +upper_bound( const ForwardRange& rng, const Value& val ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -100,7 +100,7 @@ inline BOOST_DEDUCED_TYPENAME disable_if< is_const, BOOST_DEDUCED_TYPENAME range_return::type >::type -upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) +upper_bound( ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: @@ -112,7 +112,7 @@ upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) template< range_return_value re, class ForwardRange, class Value, class SortPredicate > inline BOOST_DEDUCED_TYPENAME range_return::type -upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +upper_bound( const ForwardRange& rng, const Value& val, SortPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept )); return range_return:: From f1215fbda2d13d10913983611dbbd4ec4421648a Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Sat, 28 Sep 2019 01:05:37 +0300 Subject: [PATCH 12/17] Remove broken BOOST_NO_FUNCTION_TEMPLATE_ORDERING workaround The workaround seems to be broken for a while, no compilers with that bug are tested/supported, and there is no complaint whatsoever, not even on trac. --- include/boost/range/as_array.hpp | 4 - include/boost/range/as_literal.hpp | 6 - include/boost/range/begin.hpp | 6 - include/boost/range/detail/as_literal.hpp | 33 -- include/boost/range/detail/begin.hpp | 83 ---- .../boost/range/detail/collection_traits.hpp | 28 -- .../range/detail/collection_traits_detail.hpp | 56 --- include/boost/range/detail/detail_str.hpp | 376 ------------------ include/boost/range/detail/end.hpp | 86 ---- include/boost/range/detail/remove_extent.hpp | 157 -------- include/boost/range/detail/size_type.hpp | 55 --- include/boost/range/detail/value_type.hpp | 72 ---- include/boost/range/end.hpp | 6 - include/boost/range/iterator_range_core.hpp | 32 -- include/boost/range/rbegin.hpp | 13 - include/boost/range/rend.hpp | 13 - 16 files changed, 1026 deletions(-) delete mode 100644 include/boost/range/detail/as_literal.hpp delete mode 100644 include/boost/range/detail/begin.hpp delete mode 100644 include/boost/range/detail/detail_str.hpp delete mode 100644 include/boost/range/detail/end.hpp delete mode 100644 include/boost/range/detail/remove_extent.hpp delete mode 100644 include/boost/range/detail/size_type.hpp delete mode 100644 include/boost/range/detail/value_type.hpp diff --git a/include/boost/range/as_array.hpp b/include/boost/range/as_array.hpp index 69a1580..134efd0 100644 --- a/include/boost/range/as_array.hpp +++ b/include/boost/range/as_array.hpp @@ -28,8 +28,6 @@ namespace boost return boost::make_iterator_range( r ); } -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - template< class Range > inline boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > as_array( const Range& r ) @@ -37,8 +35,6 @@ namespace boost return boost::make_iterator_range( r ); } -#endif - } #endif diff --git a/include/boost/range/as_literal.hpp b/include/boost/range/as_literal.hpp index 3bca1a8..074f1d7 100644 --- a/include/boost/range/as_literal.hpp +++ b/include/boost/range/as_literal.hpp @@ -15,10 +15,6 @@ # pragma once #endif -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - #include #include @@ -165,6 +161,4 @@ namespace boost } } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - #endif diff --git a/include/boost/range/begin.hpp b/include/boost/range/begin.hpp index 4f53d46..29e9fa4 100644 --- a/include/boost/range/begin.hpp +++ b/include/boost/range/begin.hpp @@ -17,10 +17,6 @@ #include -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - #include #include #include @@ -122,8 +118,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) } // namespace range_adl_barrier } // namespace boost -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - namespace boost { namespace range_adl_barrier diff --git a/include/boost/range/detail/as_literal.hpp b/include/boost/range/detail/as_literal.hpp deleted file mode 100644 index 8b219ea..0000000 --- a/include/boost/range/detail/as_literal.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2006. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_AS_LITERAL_HPP -#define BOOST_RANGE_DETAIL_AS_LITERAL_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost -{ - template< class Range > - inline iterator_range::type> - as_literal( Range& r ) - { - return ::boost::make_iterator_range( ::boost::range_detail::str_begin(r), - ::boost::range_detail::str_end(r) ); - } - -} - -#endif diff --git a/include/boost/range/detail/begin.hpp b/include/boost/range/detail/begin.hpp deleted file mode 100644 index efadaa6..0000000 --- a/include/boost/range/detail/begin.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP -#define BOOST_RANGE_DETAIL_BEGIN_HPP - -#include // BOOST_MSVC -#include -#include -#include - -namespace boost -{ - - namespace range_detail - { - template< typename T > - struct range_begin; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template< typename C > - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type fun( C& c ) - { - return c.begin(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template< typename P > - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type fun( const P& p ) - { - return p.first; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_begin - { - template - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_value::type* fun(T& t) - { - return t; - } - }; - - } // namespace 'range_detail' - - namespace range_adl_barrier - { - template< typename C > - BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - begin( C& c ) - { - return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - } -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/collection_traits.hpp b/include/boost/range/detail/collection_traits.hpp index 823c0af..75b2b2b 100644 --- a/include/boost/range/detail/collection_traits.hpp +++ b/include/boost/range/detail/collection_traits.hpp @@ -187,8 +187,6 @@ namespace boost { return collection_traits::function_type::empty( c ); } -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - //! Free-standing begin() function /*! Get the begin iterator of the container. Uses collection_traits. @@ -233,32 +231,6 @@ namespace boost { return collection_traits::function_type::end( c ); } -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! Free-standing begin() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits::result_iterator - begin( C& c ) - { - return collection_traits::function_type::begin( c ); - } - - //! Free-standing end() function - /*! - \overload - */ - template< typename C > - inline typename collection_traits::result_iterator - end( C& c ) - { - return collection_traits::function_type::end( c ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - } // namespace algorithm } // namespace boost diff --git a/include/boost/range/detail/collection_traits_detail.hpp b/include/boost/range/detail/collection_traits_detail.hpp index 1545997..2dc97f1 100644 --- a/include/boost/range/detail/collection_traits_detail.hpp +++ b/include/boost/range/detail/collection_traits_detail.hpp @@ -63,8 +63,6 @@ namespace boost { return c.empty(); } -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - template< typename C > static iterator begin( C& c ) { @@ -89,22 +87,6 @@ namespace boost { return c.end(); } -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename C > - static result_iterator begin( C& c ) - { - return c.begin(); - } - - template< typename C > - static result_iterator end( C& c ) - { - return c.end(); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - }; template @@ -347,8 +329,6 @@ namespace boost { } -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - template< typename A > static iterator begin( A& a ) { @@ -373,22 +353,6 @@ namespace boost { return a+array_length_type::length(a); } -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename A > - static result_iterator begin( A& a ) - { - return a; - } - - template< typename A > - static result_iterator end( A& a ) - { - return a+array_length_type::length(a); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - }; template @@ -436,8 +400,6 @@ namespace boost { return p==0 || p[0]==0; } -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - template< typename P > static iterator begin( P& p ) { @@ -468,24 +430,6 @@ namespace boost { return p+char_traits::length(p); } -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename P > - static result_iterator begin( P& p ) - { - return p; - } - - template< typename P > - static result_iterator end( P& p ) - { - if ( p==0 ) - return p; - else - return p+char_traits::length(p); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING }; template diff --git a/include/boost/range/detail/detail_str.hpp b/include/boost/range/detail/detail_str.hpp deleted file mode 100644 index 5ef7a34..0000000 --- a/include/boost/range/detail/detail_str.hpp +++ /dev/null @@ -1,376 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_DETAIL_STR_HPP -#define BOOST_RANGE_DETAIL_DETAIL_STR_HPP - -#include // BOOST_MSVC -#include - -namespace boost -{ - - namespace range_detail - { - // - // iterator - // - - template<> - struct range_iterator_ - { - template< typename T > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - remove_extent::type* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef char* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef wchar_t* type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - - - // - // const iterator - // - - template<> - struct range_const_iterator_ - { - template< typename T > - struct pts - { - typedef const BOOST_RANGE_DEDUCED_TYPENAME - remove_extent::type* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const char* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename S > - struct pts - { - typedef const wchar_t* type; - }; - }; - } -} - -#include -#include -#include -#include -#include - -namespace boost -{ - - namespace range_detail - { - // - // str_begin() - // - template<> - struct range_begin - { - static char* fun( char* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - static const char* fun( const char* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - - static wchar_t* fun( wchar_t* s ) - { - return s; - } - }; - - template<> - struct range_begin - { - static const wchar_t* fun( const wchar_t* s ) - { - return s; - } - }; - - template< typename C > - inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - str_begin( C& c ) - { - return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME - range_detail::range::type >::fun( c ); - } - - // - // str_end() - // - - template<> - struct range_end - { - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( boost_range_array ); - } - }; - - template<> - struct range_end - { - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( boost_range_array ); - } - }; - - template<> - struct range_end - { - static char* fun( char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - template<> - struct range_end - { - static const char* fun( const char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - template<> - struct range_end - { - static wchar_t* fun( wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - - template<> - struct range_end - { - static const wchar_t* fun( const wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - - template< typename C > - inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - str_end( C& c ) - { - return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME - range_detail::range::type >::fun( c ); - } - - // - // size_type - // - - template<> - struct range_size_type_ - { - template< typename A > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename S > - struct pts - { - typedef std::size_t type; - }; - }; - - // - // value_type - // - - template<> - struct range_value_type_ - { - template< typename T > - struct pts - { - typedef char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef const char type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef wchar_t type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename S > - struct pts - { - typedef const wchar_t type; - }; - }; - - } // namespace 'range_detail' - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/end.hpp b/include/boost/range/detail/end.hpp deleted file mode 100644 index 7622921..0000000 --- a/include/boost/range/detail/end.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_END_HPP -#define BOOST_RANGE_DETAIL_END_HPP - -#include // BOOST_MSVC -#include - -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_end; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename C > - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - fun( C& c ) - { - return c.end(); - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename P > - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type - fun( const P& p ) - { - return p.second; - } - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template - BOOST_CONSTEXPR static BOOST_RANGE_DEDUCED_TYPENAME remove_extent::type* fun(T& t) - { - return t + remove_extent::size; - } - }; - - } // namespace 'range_detail' - - namespace range_adl_barrier - { - template< typename C > - BOOST_CONSTEXPR inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - end( C& c ) - { - return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - } // namespace range_adl_barrier - -} // namespace 'boost' - -#endif diff --git a/include/boost/range/detail/remove_extent.hpp b/include/boost/range/detail/remove_extent.hpp deleted file mode 100644 index 68e4597..0000000 --- a/include/boost/range/detail/remove_extent.hpp +++ /dev/null @@ -1,157 +0,0 @@ -// Boost.Range library -// -// Copyright Jonathan Turkanis 2005. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - - -#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP -#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP - -#include // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std. -#include -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - - template< typename Case1 = mpl::true_, - typename Type1 = mpl::void_, - typename Case2 = mpl::true_, - typename Type2 = mpl::void_, - typename Case3 = mpl::true_, - typename Type3 = mpl::void_, - typename Case4 = mpl::true_, - typename Type4 = mpl::void_, - typename Case5 = mpl::true_, - typename Type5 = mpl::void_, - typename Case6 = mpl::true_, - typename Type6 = mpl::void_, - typename Case7 = mpl::true_, - typename Type7 = mpl::void_, - typename Case8 = mpl::true_, - typename Type8 = mpl::void_, - typename Case9 = mpl::true_, - typename Type9 = mpl::void_, - typename Case10 = mpl::true_, - typename Type10 = mpl::void_, - typename Case11 = mpl::true_, - typename Type11 = mpl::void_, - typename Case12 = mpl::true_, - typename Type12 = mpl::void_, - typename Case13 = mpl::true_, - typename Type13 = mpl::void_, - typename Case14 = mpl::true_, - typename Type14 = mpl::void_, - typename Case15 = mpl::true_, - typename Type15 = mpl::void_, - typename Case16 = mpl::true_, - typename Type16 = mpl::void_, - typename Case17 = mpl::true_, - typename Type17 = mpl::void_, - typename Case18 = mpl::true_, - typename Type18 = mpl::void_, - typename Case19 = mpl::true_, - typename Type19 = mpl::void_, - typename Case20 = mpl::true_, - typename Type20 = mpl::void_> - struct select { - typedef typename - mpl::eval_if< - Case1, mpl::identity, mpl::eval_if< - Case2, mpl::identity, mpl::eval_if< - Case3, mpl::identity, mpl::eval_if< - Case4, mpl::identity, mpl::eval_if< - Case5, mpl::identity, mpl::eval_if< - Case6, mpl::identity, mpl::eval_if< - Case7, mpl::identity, mpl::eval_if< - Case8, mpl::identity, mpl::eval_if< - Case9, mpl::identity, mpl::if_< - Case10, Type10, mpl::void_ > > > > > > > > > - >::type result1; - typedef typename - mpl::eval_if< - Case11, mpl::identity, mpl::eval_if< - Case12, mpl::identity, mpl::eval_if< - Case13, mpl::identity, mpl::eval_if< - Case14, mpl::identity, mpl::eval_if< - Case15, mpl::identity, mpl::eval_if< - Case16, mpl::identity, mpl::eval_if< - Case17, mpl::identity, mpl::eval_if< - Case18, mpl::identity, mpl::eval_if< - Case19, mpl::identity, mpl::if_< - Case20, Type20, mpl::void_ > > > > > > > > > - > result2; - typedef typename - mpl::eval_if< - is_same, - result2, - mpl::identity - >::type type; - }; - - template - struct remove_extent { - static T* ar; - BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0])); - - typedef typename - select< - is_same, bool, - is_same, char, - is_same, signed char, - is_same, unsigned char, - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - is_same, wchar_t, - #endif - is_same, short, - is_same, unsigned short, - is_same, int, - is_same, unsigned int, - is_same, long, - is_same, unsigned long, - is_same, float, - is_same, double, - is_same, long double - >::type result1; - typedef typename - select< - is_same, const bool, - is_same, const char, - is_same, const signed char, - is_same, const unsigned char, - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - is_same, const wchar_t, - #endif - is_same, const short, - is_same, const unsigned short, - is_same, const int, - is_same, const unsigned int, - is_same, const long, - is_same, const unsigned long, - is_same, const float, - is_same, const double, - is_same, const long double - > result2; - typedef typename - mpl::eval_if< - is_same, - result2, - mpl::identity - >::type type; - }; - - } // namespace 'range_detail' - -} // namespace 'boost' - - -#endif diff --git a/include/boost/range/detail/size_type.hpp b/include/boost/range/detail/size_type.hpp deleted file mode 100644 index 78a60a4..0000000 --- a/include/boost/range/detail/size_type.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP -#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP - -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_size_type_ - { - template< typename C > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type; - }; - }; - } - - template< typename C > - class range_size - { - typedef typename range_detail::range::type c_type; - public: - typedef typename range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; -} - -#endif - diff --git a/include/boost/range/detail/value_type.hpp b/include/boost/range/detail/value_type.hpp deleted file mode 100644 index 2784514..0000000 --- a/include/boost/range/detail/value_type.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_VALUE_TYPE_HPP -#define BOOST_RANGE_DETAIL_VALUE_TYPE_HPP - -#include -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_value_type_; - - template<> - struct range_value_type_ - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::value_type type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME boost::iterator_value< BOOST_RANGE_DEDUCED_TYPENAME P::first_type >::type type; - }; - }; - - template<> - struct range_value_type_ - { - template< typename T > - struct pts - { - typedef BOOST_DEDUCED_TYPENAME remove_extent::type type; - }; - }; - - } - - template< typename C > - class range_value - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_value_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; - -} - -#endif - diff --git a/include/boost/range/end.hpp b/include/boost/range/end.hpp index eab4fa9..1bf10ca 100644 --- a/include/boost/range/end.hpp +++ b/include/boost/range/end.hpp @@ -17,10 +17,6 @@ #include -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - #include #include #include @@ -116,8 +112,6 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) } // namespace range_adl_barrier } // namespace 'boost' -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - namespace boost { namespace range_adl_barrier diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp index 7f2dc3f..e6d55d3 100644 --- a/include/boost/range/iterator_range_core.hpp +++ b/include/boost/range/iterator_range_core.hpp @@ -637,8 +637,6 @@ public: return iterator_range_detail::greater_or_equal_than( l, r ); } -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#else template< class Iterator1T, class Iterator2T > inline bool operator==( const iterator_range& l, const iterator_range& r ) @@ -743,8 +741,6 @@ public: return iterator_range_detail::greater_or_equal_than( l, r ); } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - // iterator range utilities -----------------------------------------// //! iterator_range construct helper @@ -769,17 +765,6 @@ public: return iterator_range(first, boost::next(first, n)); } -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - make_iterator_range( Range& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - ( boost::begin( r ), boost::end( r ) ); - } - -#else //! iterator_range construct helper /*! Construct an \c iterator_range from a \c Range containing the begin @@ -801,8 +786,6 @@ public: ( r, iterator_range_detail::const_range_tag() ); } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - namespace iterator_range_detail { template< class Range > @@ -827,19 +810,6 @@ public: } } -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< class Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - make_iterator_range( Range& r, - BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, - BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) - { - return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); - } - -#else - template< class Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( Range& r, @@ -858,8 +828,6 @@ public: return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - //! copy a range into a sequence /*! Construct a new sequence of the specified type from the elements diff --git a/include/boost/range/rbegin.hpp b/include/boost/range/rbegin.hpp index 6d66de9..83d3ad0 100644 --- a/include/boost/range/rbegin.hpp +++ b/include/boost/range/rbegin.hpp @@ -21,17 +21,6 @@ namespace boost { -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type -rbegin( C& c ) -{ - return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::end( c ) ); -} - -#else - template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rbegin( C& c ) @@ -50,8 +39,6 @@ rbegin( const C& c ) return iter_type( boost::end( c ) ); } -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - template< class T > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type const_rbegin( const T& r ) diff --git a/include/boost/range/rend.hpp b/include/boost/range/rend.hpp index ef70407..c91a05a 100644 --- a/include/boost/range/rend.hpp +++ b/include/boost/range/rend.hpp @@ -21,17 +21,6 @@ namespace boost { -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template< class C > -inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type -rend( C& c ) -{ - return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::begin( c ) ); -} - -#else - template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rend( C& c ) @@ -50,8 +39,6 @@ rend( const C& c ) return iter_type( boost::begin( c ) ); } -#endif - template< class T > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type const_rend( const T& r ) From c25b0e5069a69e45805b7238d280be6274f78de7 Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Thu, 13 Feb 2020 17:22:37 +0300 Subject: [PATCH 13/17] Add compile-time warning to deprecated headers --- include/boost/range/const_reverse_iterator.hpp | 4 ++++ include/boost/range/result_iterator.hpp | 4 ++++ include/boost/range/reverse_result_iterator.hpp | 4 ++++ test/const_reverse_iterator.cpp | 1 + test/result_iterator.cpp | 1 + test/reverse_result_iterator.cpp | 1 + 6 files changed, 15 insertions(+) diff --git a/include/boost/range/const_reverse_iterator.hpp b/include/boost/range/const_reverse_iterator.hpp index bfe1615..a0c3de9 100644 --- a/include/boost/range/const_reverse_iterator.hpp +++ b/include/boost/range/const_reverse_iterator.hpp @@ -15,6 +15,10 @@ # pragma once #endif +#include + +BOOST_HEADER_DEPRECATED("") + #include #include diff --git a/include/boost/range/result_iterator.hpp b/include/boost/range/result_iterator.hpp index 54e343d..48f88d7 100644 --- a/include/boost/range/result_iterator.hpp +++ b/include/boost/range/result_iterator.hpp @@ -15,6 +15,10 @@ # pragma once #endif +#include + +BOOST_HEADER_DEPRECATED("") + #include namespace boost diff --git a/include/boost/range/reverse_result_iterator.hpp b/include/boost/range/reverse_result_iterator.hpp index d375cfd..e6e6f38 100644 --- a/include/boost/range/reverse_result_iterator.hpp +++ b/include/boost/range/reverse_result_iterator.hpp @@ -15,6 +15,10 @@ # pragma once #endif +#include + +BOOST_HEADER_DEPRECATED("") + #include namespace boost diff --git a/test/const_reverse_iterator.cpp b/test/const_reverse_iterator.cpp index 44726fd..4fb484f 100644 --- a/test/const_reverse_iterator.cpp +++ b/test/const_reverse_iterator.cpp @@ -8,6 +8,7 @@ // For more information, see http://www.boost.org/libs/range/ // +#define BOOST_ALLOW_DEPRECATED_HEADERS #include #include #include diff --git a/test/result_iterator.cpp b/test/result_iterator.cpp index 88dd7a5..67d4a2d 100644 --- a/test/result_iterator.cpp +++ b/test/result_iterator.cpp @@ -8,6 +8,7 @@ // For more information, see http://www.boost.org/libs/range/ // +#define BOOST_ALLOW_DEPRECATED_HEADERS #include #include #include diff --git a/test/reverse_result_iterator.cpp b/test/reverse_result_iterator.cpp index 7d160fe..107b4bd 100644 --- a/test/reverse_result_iterator.cpp +++ b/test/reverse_result_iterator.cpp @@ -8,6 +8,7 @@ // For more information, see http://www.boost.org/libs/range/ // +#define BOOST_ALLOW_DEPRECATED_HEADERS #include #include #include From 0e8ad01bf900f1ba5917795e4fd5219e11d329e3 Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Sun, 1 Mar 2020 17:59:57 +0300 Subject: [PATCH 14/17] combine: remove unused includes and code --- include/boost/range/detail/combine_cxx03.hpp | 60 ++------------------ include/boost/range/detail/combine_cxx11.hpp | 2 - 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/include/boost/range/detail/combine_cxx03.hpp b/include/boost/range/detail/combine_cxx03.hpp index 47da6a6..c0b2a27 100644 --- a/include/boost/range/detail/combine_cxx03.hpp +++ b/include/boost/range/detail/combine_cxx03.hpp @@ -23,68 +23,20 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include +#include #include #include #include -#include -#include - -#include -#include namespace boost { - namespace range_detail - { - -template -struct combined_result_impl; - -template -struct combined_result - : combined_result_impl::value> -{ -}; - -#define BOOST_RANGE_combined_element(z, n, data) \ - typename tuples::element::type - -#define BOOST_RANGE_combined_result(z, n, data) \ - template \ - struct combined_result_impl \ - : result_of \ - { \ - }; - -#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_result(~,n,~) - -#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ - BOOST_RANGE_MAX_COMBINE_ARGS) -#include BOOST_PP_LOCAL_ITERATE() - -#define BOOST_RANGE_combined_get(z, n, data) get(tuple) - -#define BOOST_RANGE_combined_unpack(z, n, data) \ - template inline \ - typename combined_result::type \ - unpack_(mpl::int_, F f, const T& tuple) \ - { \ - return f(BOOST_PP_ENUM(n, BOOST_RANGE_combined_get, ~)); \ - } - -#define BOOST_PP_LOCAL_MACRO(n) BOOST_RANGE_combined_unpack(~,n,~) -#define BOOST_PP_LOCAL_LIMITS (BOOST_RANGE_MIN_COMBINE_ARGS, \ - BOOST_RANGE_MAX_COMBINE_ARGS) -#include BOOST_PP_LOCAL_ITERATE() - -} // namespace range_detail namespace range { @@ -114,10 +66,6 @@ namespace range #endif // include guard -#undef BOOST_RANGE_combined_element -#undef BOOST_RANGE_combined_result -#undef BOOST_RANGE_combined_get -#undef BOOST_RANGE_combined_unpack #undef BOOST_RANGE_combined_seq #undef BOOST_RANGE_combined_exp_pred #undef BOOST_RANGE_combined_exp_op diff --git a/include/boost/range/detail/combine_cxx11.hpp b/include/boost/range/detail/combine_cxx11.hpp index a7fa5b1..f4bcf80 100644 --- a/include/boost/range/detail/combine_cxx11.hpp +++ b/include/boost/range/detail/combine_cxx11.hpp @@ -15,8 +15,6 @@ #include #include -#include - namespace boost { namespace range From 45d3aae111d0f143e4ae0c1b88bc5547df2be31e Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 31 Mar 2020 16:55:55 -0400 Subject: [PATCH 15/17] Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. --- include/boost/range/begin.hpp | 8 ++++---- include/boost/range/concepts.hpp | 2 +- include/boost/range/config.hpp | 2 +- include/boost/range/end.hpp | 8 ++++---- include/boost/range/size.hpp | 2 +- test/adl_conformance.cpp | 2 +- test/algorithm_example.cpp | 2 +- test/array.cpp | 4 ++-- test/begin.cpp | 2 +- test/const_ranges.cpp | 2 +- test/end.cpp | 2 +- test/extension_mechanism.cpp | 2 +- test/extension_size.cpp | 2 +- test/iterator_pair.cpp | 2 +- test/iterator_range.cpp | 4 ++-- test/partial_workaround.cpp | 2 +- test/reversible_range.cpp | 2 +- test/std_container.cpp | 2 +- test/string.cpp | 2 +- test/sub_range.cpp | 4 ++-- 20 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/boost/range/begin.hpp b/include/boost/range/begin.hpp index 29e9fa4..17d9f84 100644 --- a/include/boost/range/begin.hpp +++ b/include/boost/range/begin.hpp @@ -24,7 +24,7 @@ namespace boost { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) namespace range_detail { #endif @@ -81,7 +81,7 @@ namespace range_detail } -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) } // namespace 'range_detail' #endif @@ -97,7 +97,7 @@ BOOST_CONSTEXPR #endif inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_begin( r ); @@ -109,7 +109,7 @@ BOOST_CONSTEXPR #endif inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_begin( r ); diff --git a/include/boost/range/concepts.hpp b/include/boost/range/concepts.hpp index f6f9f41..d6235d6 100644 --- a/include/boost/range/concepts.hpp +++ b/include/boost/range/concepts.hpp @@ -84,7 +84,7 @@ namespace boost { #endif #endif - #ifdef __BORLANDC__ + #ifdef BOOST_BORLANDC #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 #endif diff --git a/include/boost/range/config.hpp b/include/boost/range/config.hpp index 7600a5f..636df7b 100644 --- a/include/boost/range/config.hpp +++ b/include/boost/range/config.hpp @@ -23,7 +23,7 @@ #error "macro already defined!" #endif -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # define BOOST_RANGE_DEDUCED_TYPENAME typename #else #define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME diff --git a/include/boost/range/end.hpp b/include/boost/range/end.hpp index 1bf10ca..3325909 100644 --- a/include/boost/range/end.hpp +++ b/include/boost/range/end.hpp @@ -26,7 +26,7 @@ namespace boost { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) namespace range_detail { #endif @@ -78,7 +78,7 @@ namespace range_detail return range_detail::array_end( a ); } -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) } // namespace 'range_detail' #endif @@ -91,7 +91,7 @@ BOOST_CONSTEXPR #endif inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_end( r ); @@ -103,7 +103,7 @@ BOOST_CONSTEXPR #endif inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_end( r ); diff --git a/include/boost/range/size.hpp b/include/boost/range/size.hpp index 7f38db8..5f722d0 100644 --- a/include/boost/range/size.hpp +++ b/include/boost/range/size.hpp @@ -62,7 +62,7 @@ namespace boost BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); #endif -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ +#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; diff --git a/test/adl_conformance.cpp b/test/adl_conformance.cpp index 8bae491..0d73b6a 100644 --- a/test/adl_conformance.cpp +++ b/test/adl_conformance.cpp @@ -10,7 +10,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/algorithm_example.cpp b/test/algorithm_example.cpp index 80c7875..bae2901 100644 --- a/test/algorithm_example.cpp +++ b/test/algorithm_example.cpp @@ -10,7 +10,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/array.cpp b/test/array.cpp index b913fde..a9bd170 100644 --- a/test/array.cpp +++ b/test/array.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif @@ -35,7 +35,7 @@ void check_array() // BOOST_RANGE_NO_STATIC_ASSERT -#if !defined( __BORLANDC__ ) +#if !defined( BOOST_BORLANDC ) #else BOOST_STATIC_ASSERT(( is_same< range_value::type, int >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, int* >::value )); diff --git a/test/begin.cpp b/test/begin.cpp index f014535..91f50ce 100644 --- a/test/begin.cpp +++ b/test/begin.cpp @@ -10,7 +10,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/const_ranges.cpp b/test/const_ranges.cpp index 22bf83c..2410869 100644 --- a/test/const_ranges.cpp +++ b/test/const_ranges.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/end.cpp b/test/end.cpp index c885555..b73a532 100644 --- a/test/end.cpp +++ b/test/end.cpp @@ -10,7 +10,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/extension_mechanism.cpp b/test/extension_mechanism.cpp index b8b7112..7c735c3 100644 --- a/test/extension_mechanism.cpp +++ b/test/extension_mechanism.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/extension_size.cpp b/test/extension_size.cpp index b9cc1b2..dbff55b 100644 --- a/test/extension_size.cpp +++ b/test/extension_size.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/iterator_pair.cpp b/test/iterator_pair.cpp index 7b615a9..19e5acd 100644 --- a/test/iterator_pair.cpp +++ b/test/iterator_pair.cpp @@ -10,7 +10,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/iterator_range.cpp b/test/iterator_range.cpp index 9bbcff2..fd534bb 100644 --- a/test/iterator_range.cpp +++ b/test/iterator_range.cpp @@ -12,7 +12,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif @@ -47,7 +47,7 @@ void check_iterator_range() BOOST_CHECK( !r.empty() ); BOOST_CHECK( !r2.empty() ); -//#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +//#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // if( !(bool)r ) // BOOST_CHECK( false ); // if( !(bool)r2 ) diff --git a/test/partial_workaround.cpp b/test/partial_workaround.cpp index edaae71..b8da415 100644 --- a/test/partial_workaround.cpp +++ b/test/partial_workaround.cpp @@ -13,7 +13,7 @@ #include #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/reversible_range.cpp b/test/reversible_range.cpp index a3dd20c..fec18c3 100644 --- a/test/reversible_range.cpp +++ b/test/reversible_range.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/std_container.cpp b/test/std_container.cpp index 75a584f..f980bff 100644 --- a/test/std_container.cpp +++ b/test/std_container.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/string.cpp b/test/string.cpp index 9ff13f9..c7ee60a 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -12,7 +12,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif diff --git a/test/sub_range.cpp b/test/sub_range.cpp index a6dbb36..6a0113e 100644 --- a/test/sub_range.cpp +++ b/test/sub_range.cpp @@ -11,7 +11,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) # pragma warn -8091 // suppress warning in Boost.Test # pragma warn -8057 // unused argument argc/argv in Boost.Test #endif @@ -65,7 +65,7 @@ void check_sub_range() BOOST_CHECK_EQUAL( r.size(), s.size() ); BOOST_CHECK_EQUAL( r2.size(), s2.size() ); -//#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +//#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // if( !(bool)r ) // BOOST_CHECK( false ); // if( !(bool)r2 ) From 3b04f1a65eb3c78472e2aed6ea6b93978017f777 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 11 May 2020 19:13:20 +0300 Subject: [PATCH 16/17] Remove uses of deprecated header boost/detail/iterator.hpp. This header was deprecated in favor of . It generates compiler warnings and will be removed in a future release. --- .../range/detail/collection_traits_detail.hpp | 23 ++++++++++--------- test/string.cpp | 7 +++--- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/include/boost/range/detail/collection_traits_detail.hpp b/include/boost/range/detail/collection_traits_detail.hpp index 2dc97f1..5a3124b 100644 --- a/include/boost/range/detail/collection_traits_detail.hpp +++ b/include/boost/range/detail/collection_traits_detail.hpp @@ -12,6 +12,8 @@ #include #include +#include +#include #include #include #include @@ -22,7 +24,6 @@ #include #include #include -#include // Container traits implementation --------------------------------------------------------- @@ -36,7 +37,7 @@ namespace boost { /* Wraps std::container compliant containers */ - template< typename ContainerT > + template< typename ContainerT > struct default_container_traits { typedef typename ContainerT::value_type value_type; @@ -49,7 +50,7 @@ namespace boost { >::type result_iterator; typedef typename ContainerT::difference_type difference_type; typedef typename ContainerT::size_type size_type; - + // static operations template< typename C > static size_type size( const C& c ) @@ -120,11 +121,11 @@ namespace boost { { typedef typename PairT::first_type element_type; - typedef typename ::boost::detail:: - iterator_traits::value_type value_type; + typedef typename + std::iterator_traits::value_type value_type; typedef std::size_t size_type; - typedef typename ::boost::detail:: - iterator_traits::difference_type difference_type; + typedef typename + std::iterator_traits::difference_type difference_type; typedef element_type iterator; typedef element_type const_iterator; @@ -186,7 +187,7 @@ namespace boost { BOOST_STATIC_CONSTANT( size_type, array_size = sz ); }; - + // array length resolving /* Lenght of string contained in a static array could @@ -243,7 +244,7 @@ namespace boost { else return std::char_traits::length(a); } - + template< typename A > static bool empty( const A& a ) { @@ -303,7 +304,7 @@ namespace boost { const_iterator, iterator >::type result_iterator; - + private: // resolve array size typedef typename @@ -327,7 +328,7 @@ namespace boost { { return array_length_type::empty(a); } - + template< typename A > static iterator begin( A& a ) diff --git a/test/string.cpp b/test/string.cpp index 9ff13f9..b6c44f0 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include namespace @@ -146,7 +147,7 @@ void check_char() char* char_s2 = a_string.mutable_sz(); BOOST_STATIC_ASSERT(( is_same< range_value::type, - detail::iterator_traits::value_type>::value )); + std::iterator_traits::value_type>::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, char_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_difference::type, @@ -225,11 +226,11 @@ void check_string() wchar_t* char_ws2 = a_wide_string.mutable_sz(); BOOST_STATIC_ASSERT(( is_same< range_value::type, - detail::iterator_traits::value_type>::value )); + std::iterator_traits::value_type>::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const wchar_t* >::value )); BOOST_STATIC_ASSERT(( is_same< range_difference::type, - detail::iterator_traits::difference_type >::value )); + std::iterator_traits::difference_type >::value )); BOOST_STATIC_ASSERT(( is_same< range_size::type, std::size_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, wchar_iterator_t >::value )); BOOST_STATIC_ASSERT(( is_same< range_iterator::type, const wchar_t* >::value )); From ee1ec1cf57044e08cba49611bf479ff3aa41485e Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Mon, 11 May 2020 19:26:26 +0300 Subject: [PATCH 17/17] Fix deprecated usage of boost/bind.hpp. boost/bind.hpp emits compiler warnings about deprecation of the header and global _N placeholders. This commit converts usage of this header to boost/bind/bind.hpp and using namespace boost::placeholders. Where boost::bind is not actually used, the includes are removed. --- test/adaptor_test/chained.cpp | 4 +++- test/adaptor_test/transformed.cpp | 3 ++- test/algorithm.cpp | 3 +-- test/algorithm_test/binary_search.cpp | 1 - test/algorithm_test/equal_range.cpp | 1 - test/algorithm_test/generate.cpp | 1 - test/algorithm_test/heap.cpp | 1 - test/algorithm_test/includes.cpp | 1 - test/algorithm_test/inplace_merge.cpp | 1 - test/algorithm_test/lower_bound.cpp | 1 - test/algorithm_test/max_element.cpp | 1 - test/algorithm_test/merge.cpp | 1 - test/algorithm_test/min_element.cpp | 1 - test/algorithm_test/nth_element.cpp | 1 - test/algorithm_test/partial_sort.cpp | 1 - test/algorithm_test/partition.cpp | 1 - test/algorithm_test/random_shuffle.cpp | 1 - test/algorithm_test/remove.cpp | 1 - test/algorithm_test/remove_copy.cpp | 1 - test/algorithm_test/remove_copy_if.cpp | 4 +++- test/algorithm_test/remove_if.cpp | 4 +++- test/algorithm_test/replace_copy.cpp | 1 - test/algorithm_test/replace_copy_if.cpp | 4 +++- test/algorithm_test/replace_if.cpp | 4 +++- test/algorithm_test/reverse.cpp | 1 - test/algorithm_test/reverse_copy.cpp | 1 - test/algorithm_test/rotate.cpp | 1 - test/algorithm_test/rotate_copy.cpp | 1 - test/algorithm_test/set_difference.cpp | 1 - test/algorithm_test/set_intersection.cpp | 1 - test/algorithm_test/set_symmetric_difference.cpp | 1 - test/algorithm_test/set_union.cpp | 1 - test/algorithm_test/sort.cpp | 1 - test/algorithm_test/stable_partition.cpp | 1 - test/algorithm_test/stable_sort.cpp | 1 - test/algorithm_test/swap_ranges.cpp | 1 - test/algorithm_test/unique.cpp | 1 - test/algorithm_test/unique_copy.cpp | 1 - test/algorithm_test/upper_bound.cpp | 1 - 39 files changed, 18 insertions(+), 40 deletions(-) diff --git a/test/adaptor_test/chained.cpp b/test/adaptor_test/chained.cpp index 1b756c9..df9de43 100644 --- a/test/adaptor_test/chained.cpp +++ b/test/adaptor_test/chained.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -88,6 +88,8 @@ void chained_adaptors_test() std::set foos; + using namespace boost::placeholders; + boost::copy(sep | boost::adaptors::transformed(boost::bind(&foo::from_string, _1)) | boost::adaptors::filtered(boost::bind(&foo::is_valid, _1)), diff --git a/test/adaptor_test/transformed.cpp b/test/adaptor_test/transformed.cpp index 10f6a0c..4620a15 100644 --- a/test/adaptor_test/transformed.cpp +++ b/test/adaptor_test/transformed.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -140,6 +140,7 @@ namespace boost void transformed_bind() { using namespace boost::adaptors; + using namespace boost::placeholders; std::vector input(5); std::vector output; diff --git a/test/algorithm.cpp b/test/algorithm.cpp index e945d42..024e404 100644 --- a/test/algorithm.cpp +++ b/test/algorithm.cpp @@ -35,9 +35,8 @@ #endif #include -#include +#include #include -#include #include #include #include diff --git a/test/algorithm_test/binary_search.cpp b/test/algorithm_test/binary_search.cpp index 2646c2e..7cf985d 100644 --- a/test/algorithm_test/binary_search.cpp +++ b/test/algorithm_test/binary_search.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/equal_range.cpp b/test/algorithm_test/equal_range.cpp index 612f1a4..00b07a6 100644 --- a/test/algorithm_test/equal_range.cpp +++ b/test/algorithm_test/equal_range.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/generate.cpp b/test/algorithm_test/generate.cpp index d8fc0e6..907f9fb 100644 --- a/test/algorithm_test/generate.cpp +++ b/test/algorithm_test/generate.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/heap.cpp b/test/algorithm_test/heap.cpp index 74b7fa3..9c5b7c6 100644 --- a/test/algorithm_test/heap.cpp +++ b/test/algorithm_test/heap.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/includes.cpp b/test/algorithm_test/includes.cpp index 8977532..ce28fac 100644 --- a/test/algorithm_test/includes.cpp +++ b/test/algorithm_test/includes.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/test/algorithm_test/inplace_merge.cpp b/test/algorithm_test/inplace_merge.cpp index 948e95e..3b2082a 100644 --- a/test/algorithm_test/inplace_merge.cpp +++ b/test/algorithm_test/inplace_merge.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/lower_bound.cpp b/test/algorithm_test/lower_bound.cpp index 2a120a4..d4b18cf 100644 --- a/test/algorithm_test/lower_bound.cpp +++ b/test/algorithm_test/lower_bound.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include "../test_driver/range_return_test_driver.hpp" #include diff --git a/test/algorithm_test/max_element.cpp b/test/algorithm_test/max_element.cpp index d4e87d5..f6092a2 100644 --- a/test/algorithm_test/max_element.cpp +++ b/test/algorithm_test/max_element.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include "../test_driver/range_return_test_driver.hpp" #include diff --git a/test/algorithm_test/merge.cpp b/test/algorithm_test/merge.cpp index 5038782..b173019 100644 --- a/test/algorithm_test/merge.cpp +++ b/test/algorithm_test/merge.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/min_element.cpp b/test/algorithm_test/min_element.cpp index bb92d2c..b545f66 100644 --- a/test/algorithm_test/min_element.cpp +++ b/test/algorithm_test/min_element.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include "../test_driver/range_return_test_driver.hpp" #include diff --git a/test/algorithm_test/nth_element.cpp b/test/algorithm_test/nth_element.cpp index df241e9..044e663 100644 --- a/test/algorithm_test/nth_element.cpp +++ b/test/algorithm_test/nth_element.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/partial_sort.cpp b/test/algorithm_test/partial_sort.cpp index c13f7f1..5fb2686 100644 --- a/test/algorithm_test/partial_sort.cpp +++ b/test/algorithm_test/partial_sort.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/partition.cpp b/test/algorithm_test/partition.cpp index 22aefd6..bdc4508 100644 --- a/test/algorithm_test/partition.cpp +++ b/test/algorithm_test/partition.cpp @@ -12,7 +12,6 @@ #include #include -#include #include "../test_driver/range_return_test_driver.hpp" #include #include diff --git a/test/algorithm_test/random_shuffle.cpp b/test/algorithm_test/random_shuffle.cpp index 71915ee..6b3db1e 100644 --- a/test/algorithm_test/random_shuffle.cpp +++ b/test/algorithm_test/random_shuffle.cpp @@ -12,7 +12,6 @@ #include #include -#include #include "../test_function/counted_function.hpp" #include #include diff --git a/test/algorithm_test/remove.cpp b/test/algorithm_test/remove.cpp index 3e4ab16..8312d9f 100644 --- a/test/algorithm_test/remove.cpp +++ b/test/algorithm_test/remove.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/remove_copy.cpp b/test/algorithm_test/remove_copy.cpp index b3eb8e2..3065d9e 100644 --- a/test/algorithm_test/remove_copy.cpp +++ b/test/algorithm_test/remove_copy.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/remove_copy_if.cpp b/test/algorithm_test/remove_copy_if.cpp index c269c2a..8a5d2ae 100644 --- a/test/algorithm_test/remove_copy_if.cpp +++ b/test/algorithm_test/remove_copy_if.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -64,6 +64,8 @@ namespace template< class Container > void test_remove_copy_if_( const Container& c, int to_remove ) { + using namespace boost::placeholders; + test_remove_copy_if_impl(c, boost::bind(std::equal_to(), _1, to_remove)); test_remove_copy_if_impl(c, boost::bind(std::not_equal_to(), _1, to_remove)); } diff --git a/test/algorithm_test/remove_if.cpp b/test/algorithm_test/remove_if.cpp index 58fc07f..226e74d 100644 --- a/test/algorithm_test/remove_if.cpp +++ b/test/algorithm_test/remove_if.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -59,6 +59,8 @@ namespace boost template< class Container > void test_remove_if_( const Container& c, int to_remove ) { + using namespace boost::placeholders; + test_remove_if_impl(c, boost::bind(std::equal_to(), _1, to_remove)); test_remove_if_impl(c, boost::bind(std::not_equal_to(), _1, to_remove)); } diff --git a/test/algorithm_test/replace_copy.cpp b/test/algorithm_test/replace_copy.cpp index 5629856..7d0ccd5 100644 --- a/test/algorithm_test/replace_copy.cpp +++ b/test/algorithm_test/replace_copy.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/replace_copy_if.cpp b/test/algorithm_test/replace_copy_if.cpp index 6873547..af34256 100644 --- a/test/algorithm_test/replace_copy_if.cpp +++ b/test/algorithm_test/replace_copy_if.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -66,6 +66,8 @@ namespace template< class Container > void test_replace_copy_if_( const Container& c, int to_replace ) { + using namespace boost::placeholders; + test_replace_copy_if_impl(c, boost::bind(std::equal_to(), _1, to_replace)); test_replace_copy_if_impl(c, boost::bind(std::not_equal_to(), _1, to_replace)); } diff --git a/test/algorithm_test/replace_if.cpp b/test/algorithm_test/replace_if.cpp index 12d7293..ecd3a74 100644 --- a/test/algorithm_test/replace_if.cpp +++ b/test/algorithm_test/replace_if.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -29,6 +29,8 @@ namespace boost template< class Container, class UnaryPredicate > void test_replace_if_impl(Container& cont, UnaryPredicate pred) { + using namespace boost::placeholders; + const int what = 2; const int with_what = 5; diff --git a/test/algorithm_test/reverse.cpp b/test/algorithm_test/reverse.cpp index 3ad63cb..08ca2c5 100644 --- a/test/algorithm_test/reverse.cpp +++ b/test/algorithm_test/reverse.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/reverse_copy.cpp b/test/algorithm_test/reverse_copy.cpp index 92ef485..8edfcda 100644 --- a/test/algorithm_test/reverse_copy.cpp +++ b/test/algorithm_test/reverse_copy.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/rotate.cpp b/test/algorithm_test/rotate.cpp index b6b7af2..6b487d7 100644 --- a/test/algorithm_test/rotate.cpp +++ b/test/algorithm_test/rotate.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/rotate_copy.cpp b/test/algorithm_test/rotate_copy.cpp index 05aa4d2..7f43fc0 100644 --- a/test/algorithm_test/rotate_copy.cpp +++ b/test/algorithm_test/rotate_copy.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/set_difference.cpp b/test/algorithm_test/set_difference.cpp index 84dc62c..303fd58 100644 --- a/test/algorithm_test/set_difference.cpp +++ b/test/algorithm_test/set_difference.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/set_intersection.cpp b/test/algorithm_test/set_intersection.cpp index 213bbdf..5e08e05 100644 --- a/test/algorithm_test/set_intersection.cpp +++ b/test/algorithm_test/set_intersection.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/set_symmetric_difference.cpp b/test/algorithm_test/set_symmetric_difference.cpp index b792fd8..e52b16e 100644 --- a/test/algorithm_test/set_symmetric_difference.cpp +++ b/test/algorithm_test/set_symmetric_difference.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/set_union.cpp b/test/algorithm_test/set_union.cpp index 7f9f10a..6c7208b 100644 --- a/test/algorithm_test/set_union.cpp +++ b/test/algorithm_test/set_union.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/sort.cpp b/test/algorithm_test/sort.cpp index c6611f7..33a681a 100644 --- a/test/algorithm_test/sort.cpp +++ b/test/algorithm_test/sort.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/stable_partition.cpp b/test/algorithm_test/stable_partition.cpp index b39161f..b5b1538 100644 --- a/test/algorithm_test/stable_partition.cpp +++ b/test/algorithm_test/stable_partition.cpp @@ -12,7 +12,6 @@ #include #include -#include #include "../test_driver/range_return_test_driver.hpp" #include #include diff --git a/test/algorithm_test/stable_sort.cpp b/test/algorithm_test/stable_sort.cpp index 8372bd6..1c33963 100644 --- a/test/algorithm_test/stable_sort.cpp +++ b/test/algorithm_test/stable_sort.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/swap_ranges.cpp b/test/algorithm_test/swap_ranges.cpp index a96bfac..02a4444 100644 --- a/test/algorithm_test/swap_ranges.cpp +++ b/test/algorithm_test/swap_ranges.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/unique.cpp b/test/algorithm_test/unique.cpp index d8eb784..8d7752a 100644 --- a/test/algorithm_test/unique.cpp +++ b/test/algorithm_test/unique.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include "../test_driver/range_overload_test_driver.hpp" #include diff --git a/test/algorithm_test/unique_copy.cpp b/test/algorithm_test/unique_copy.cpp index 21f107a..cd25162 100644 --- a/test/algorithm_test/unique_copy.cpp +++ b/test/algorithm_test/unique_copy.cpp @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/test/algorithm_test/upper_bound.cpp b/test/algorithm_test/upper_bound.cpp index daae764..0dff22f 100644 --- a/test/algorithm_test/upper_bound.cpp +++ b/test/algorithm_test/upper_bound.cpp @@ -12,7 +12,6 @@ #include #include -#include #include "../test_driver/range_return_test_driver.hpp" #include #include