Remove more workarounds.

This commit is contained in:
Georgy Guminov
2025-01-25 17:30:01 +03:00
parent 5a4ba24d36
commit 8d080c6c58
21 changed files with 22 additions and 286 deletions
+1 -2
View File
@@ -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).
-9
View File
@@ -8,9 +8,6 @@
#include <boost/noncopyable.hpp>
#include <boost/iterator/is_lvalue_iterator.hpp>
// Last, for BOOST_NO_LVALUE_RETURN_DETECTION
#include <boost/iterator/detail/config_def.hpp>
struct v
{
v();
@@ -104,10 +101,8 @@ int main()
"boost::is_lvalue_iterator<proxy_iterator<v>>::value is expected to be false.");
static_assert(!boost::is_lvalue_iterator<proxy_iterator<int>>::value,
"boost::is_lvalue_iterator<proxy_iterator<int>>::value is expected to be false.");
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(!boost::is_lvalue_iterator<value_iterator>::value,
"boost::is_lvalue_iterator<value_iterator>::value is expected to be false.");
#endif
// Make sure inaccessible copy constructor doesn't prevent
// reference binding
static_assert(boost::is_lvalue_iterator<noncopyable_iterator>::value,
@@ -150,19 +145,15 @@ int main()
"boost::is_non_const_lvalue_iterator<proxy_iterator<v>>::value is expected to be false.");
static_assert(!boost::is_non_const_lvalue_iterator<proxy_iterator<int>>::value,
"boost::is_non_const_lvalue_iterator<proxy_iterator<int>>::value is expected to be false.");
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(!boost::is_non_const_lvalue_iterator<value_iterator>::value,
"boost::is_non_const_lvalue_iterator<value_iterator>::value is expected to be false.");
#endif
static_assert(!boost::is_non_const_lvalue_iterator<noncopyable_iterator>::value,
"boost::is_non_const_lvalue_iterator<noncopyable_iterator>::value is expected to be false.");
static_assert(boost::is_non_const_lvalue_iterator<lvalue_iterator<v>>::value,
"boost::is_non_const_lvalue_iterator<lvalue_iterator<v>>::value is expected to be true.");
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))
static_assert(boost::is_non_const_lvalue_iterator<lvalue_iterator<int>>::value,
"boost::is_non_const_lvalue_iterator<lvalue_iterator<int>>::value is expected to be true.");
#endif
static_assert(boost::is_non_const_lvalue_iterator<lvalue_iterator<char*>>::value,
"boost::is_non_const_lvalue_iterator<lvalue_iterator<char*>>::value is expected to be true.");
static_assert(boost::is_non_const_lvalue_iterator<lvalue_iterator<float>>::value,
-3
View File
@@ -8,9 +8,6 @@
#include <boost/noncopyable.hpp>
#include <boost/iterator/is_readable_iterator.hpp>
// Last, for BOOST_NO_LVALUE_RETURN_DETECTION
#include <boost/iterator/detail/config_def.hpp>
struct v
{
v();
+2 -24
View File
@@ -13,10 +13,8 @@
#include <numeric>
#include <boost/iterator/iterator_adaptor.hpp>
#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
# include <boost/iterator/is_readable_iterator.hpp>
# include <boost/iterator/is_lvalue_iterator.hpp>
#endif
#include <boost/iterator/is_readable_iterator.hpp>
#include <boost/iterator/is_lvalue_iterator.hpp>
#include <boost/pending/iterator_tests.hpp>
# include <boost/core/lightweight_test.hpp>
@@ -29,8 +27,6 @@
#include "static_assert_same.hpp"
#include <boost/iterator/detail/config_def.hpp>
using boost::dummyT;
typedef std::deque<int> 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<Iter1::reference, int&>::value;
test = static_assert_same<Iter1::pointer, int*>::value;
test = static_assert_same<Iter1::difference_type, std::ptrdiff_t>::value;
#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
static_assert(
std::is_convertible<Iter1::iterator_category, std::random_access_iterator_tag>::value,
"Iterator must have a random access category."
);
#endif
}
{
@@ -222,16 +210,10 @@ main()
test = static_assert_same<Iter1::value_type, int>::value;
test = static_assert_same<Iter1::reference, const int&>::value;
#if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
static_assert(boost::is_readable_iterator<Iter1>::value, "Iter1 is expected to be readable.");
# ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(boost::is_lvalue_iterator<Iter1>::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<Iter1::pointer, int const*>::value;
#endif
}
{
@@ -241,11 +223,8 @@ main()
test = static_assert_same<Iter::value_type, int>::value;
test = static_assert_same<Iter::reference, int const&>::value;
#if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564)) // borland drops constness
test = static_assert_same<Iter::pointer, int const*>::value;
#endif
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION
static_assert(
boost::is_non_const_lvalue_iterator<BaseIter>::value,
"boost::is_non_const_lvalue_iterator<BaseIter>::value is expected to be true."
@@ -254,7 +233,6 @@ main()
boost::is_lvalue_iterator<Iter>::value,
"boost::is_lvalue_iterator<Iter>::value is expected to be true."
);
#endif
typedef modify_traversal<BaseIter, boost::incrementable_traversal_tag> IncrementableIter;
-10
View File
@@ -23,16 +23,6 @@
#include "static_assert_same.hpp"
#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace boost { namespace detail
{
template<> struct function_object_result<int (*)(int)>
{
typedef int type;
};
}}
#endif
struct mult_functor {
// Functors used with transform_iterator must be
// DefaultConstructible, as the transform_iterator must be