Remove more workarounds.

This commit is contained in:
Georgy Guminov committed 2025-01-25 17:30:01 +03:00
1 parent 5a4ba24d36
commit 8d080c6c58
21 files changed
+22 -286

No files matched your search

+1 -37
View File
@@ -26,8 +26,7 @@
// libs/iterator/test/constant_iterator_arrow.cpp fails to compile
// because the operator-> return is improperly deduced as a non-const
// pointer.
#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|| BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x531))
#if 1
// Recall that in general, compilers without partial specialization
// can't strip constness. Consider counting_iterator, which normally
@@ -46,39 +45,4 @@
#endif
#if (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
# define BOOST_NO_LVALUE_RETURN_DETECTION
# if 0 // test code
struct v {};
typedef char (&no)[3];
template <class T>
no foo(T const&, ...);
template <class T>
char foo(T&, int);
struct value_iterator
{
v operator*() const;
};
template <class T>
struct lvalue_deref_helper
{
static T& x;
enum { value = (sizeof(foo(*x,0)) == 1) };
};
int z2[(lvalue_deref_helper<v*>::value == 1) ? 1 : -1];
int z[(lvalue_deref_helper<value_iterator>::value) == 1 ? -1 : 1 ];
# endif
#endif
// no include guard; multiple inclusion intended
@@ -11,7 +11,7 @@
// 23/02/03 thw
//
#undef BOOST_NO_LVALUE_RETURN_DETECTION
#undef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
#ifdef BOOST_ITERATOR_CONFIG_DEF
# undef BOOST_ITERATOR_CONFIG_DEF
@@ -77,7 +77,7 @@ struct iterator_writability_disabled
template <class Traversal, class ValueParam, class Reference>
struct iterator_facade_default_category
: mpl::eval_if<
conjunction<
detail::conjunction<
std::is_reference<Reference>
, std::is_convertible<Traversal,forward_traversal_tag>
>
@@ -90,8 +90,8 @@ struct iterator_facade_default_category
, std::forward_iterator_tag
>
>
, typename mpl::eval_if<
conjunction<
, mpl::eval_if<
detail::conjunction<
std::is_convertible<Traversal, single_pass_traversal_tag>
// check for readability
@@ -143,9 +143,7 @@ struct iterator_category_with_traversal
static_assert(is_iterator_category<Category>::value, "Category must be an STL iterator category.");
static_assert(!is_iterator_category<Traversal>::value, "Traversal must not be an STL iterator category.");
static_assert(!is_iterator_traversal<Category>::value, "Category must not be a traversal tag.");
# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
static_assert(is_iterator_traversal<Traversal>::value, "Traversal must be a traversal tag.");
# endif
};
// Computes an iterator_category tag whose traversal is Traversal and
@@ -1,19 +0,0 @@
// Copyright David Abrahams 2003. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef MINIMUM_CATEGORY_DWA20031119_HPP
# define MINIMUM_CATEGORY_DWA20031119_HPP
# include <boost/iterator/minimum_category.hpp>
namespace boost {
// This import below (as well as the whole header) is for backward compatibility
// with boost/token_iterator.hpp. It should be removed as soon as that header is fixed.
namespace detail {
using iterators::minimum_category;
} // namespace detail
} // namespace boost
#endif // MINIMUM_CATEGORY_DWA20031119_HPP