Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ target_link_libraries(boost_iterator
Boost::mpl
Boost::optional
Boost::smart_ptr
Boost::static_assert
Boost::type_traits
Boost::utility
)
1 change: 0 additions & 1 deletion build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ constant boost_dependencies :
/boost/mpl//boost_mpl
/boost/optional//boost_optional
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;

Expand Down
18 changes: 3 additions & 15 deletions example/node_iterator2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

# include "node.hpp"
# include <boost/iterator/iterator_facade.hpp>

# ifndef BOOST_NO_SFINAE
# include <boost/type_traits/is_convertible.hpp>
# include <boost/utility/enable_if.hpp>
# endif
# include <type_traits>

template <class Value>
class node_iter
Expand All @@ -33,21 +29,13 @@ class node_iter
template <class OtherValue>
node_iter(
node_iter<OtherValue> const& other
# ifndef BOOST_NO_SFINAE
, typename boost::enable_if<
boost::is_convertible<OtherValue*,Value*>
, typename std::enable_if<
std::is_convertible<OtherValue*,Value*>::value
, enabler
>::type = enabler()
# endif
)
: m_node(other.m_node) {}


# if !BOOST_WORKAROUND(__GNUC__, == 2)
private: // GCC2 can't grant friendship to template member functions
friend class boost::iterator_core_access;
# endif

template <class OtherValue>
bool equal(node_iter<OtherValue> const& other) const
{
Expand Down
12 changes: 3 additions & 9 deletions example/node_iterator3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@

# include "node.hpp"
# include <boost/iterator/iterator_adaptor.hpp>

# ifndef BOOST_NO_SFINAE
# include <boost/type_traits/is_convertible.hpp>
# include <boost/utility/enable_if.hpp>
# endif
# include <type_traits>

template <class Value>
class node_iter
Expand Down Expand Up @@ -38,12 +34,10 @@ class node_iter
template <class OtherValue>
node_iter(
node_iter<OtherValue> const& other
# ifndef BOOST_NO_SFINAE
, typename boost::enable_if<
boost::is_convertible<OtherValue*,Value*>
, typename std::enable_if<
std::is_convertible<OtherValue*,Value*>::value
, enabler
>::type = enabler()
# endif
)
: super_t(other.base()) {}

Expand Down
2 changes: 1 addition & 1 deletion include/boost/generator_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct generator_iterator_generator

template <class Generator>
inline generator_iterator<Generator>
make_generator_iterator(Generator & gen)
make_generator_iterator(Generator& gen)
{
typedef generator_iterator<Generator> result_t;
return result_t(&gen);
Expand Down
1 change: 0 additions & 1 deletion include/boost/indirect_reference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

# include <boost/detail/is_incrementable.hpp>
# include <boost/iterator/iterator_traits.hpp>
# include <boost/type_traits/remove_cv.hpp>
# include <boost/mpl/eval_if.hpp>
# include <boost/pointee.hpp>

Expand Down
10 changes: 0 additions & 10 deletions include/boost/iterator/advance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ namespace iterators {
}
}

#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600)
// type-limits warning issued below when n is an unsigned integral
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif

template <typename BidirectionalIterator, typename Distance>
inline BOOST_CXX14_CONSTEXPR void
advance_impl(
Expand All @@ -57,10 +51,6 @@ namespace iterators {
}
}

#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600)
#pragma GCC diagnostic pop
#endif

template <typename RandomAccessIterator, typename Distance>
inline BOOST_CXX14_CONSTEXPR void
advance_impl(
Expand Down
27 changes: 10 additions & 17 deletions include/boost/iterator/counting_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
#ifndef COUNTING_ITERATOR_DWA200348_HPP
# define COUNTING_ITERATOR_DWA200348_HPP

# include <type_traits>

# include <boost/config.hpp>
# include <boost/static_assert.hpp>
# include <boost/detail/workaround.hpp>
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
# include <limits>
# elif !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
# include <boost/type_traits/is_convertible.hpp>
# else
# include <boost/type_traits/is_arithmetic.hpp>
# endif
# include <boost/type_traits/is_integral.hpp>
# include <boost/type_traits/type_identity.hpp>
# include <boost/type_traits/conditional.hpp>
# include <boost/type_traits/integral_constant.hpp>
# include <boost/detail/numeric_traits.hpp>
# include <boost/iterator/iterator_adaptor.hpp>

Expand All @@ -38,8 +33,6 @@ namespace detail
template <class T>
struct is_numeric_impl
{
// For a while, this wasn't true, but we rely on it below. This is a regression assert.
BOOST_STATIC_ASSERT(::boost::is_integral<char>::value);

# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS

Expand All @@ -50,19 +43,19 @@ namespace detail
# if !BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
BOOST_STATIC_CONSTANT(
bool, value = (
boost::is_convertible<int,T>::value
&& boost::is_convertible<T,int>::value
std::is_convertible<int,T>::value
&& std::is_convertible<T,int>::value
));
# else
BOOST_STATIC_CONSTANT(bool, value = ::boost::is_arithmetic<T>::value);
BOOST_STATIC_CONSTANT(bool, value = std::is_arithmetic<T>::value);
# endif

# endif
};

template <class T>
struct is_numeric
: boost::integral_constant<bool, ::boost::iterators::detail::is_numeric_impl<T>::value>
: std::integral_constant<bool, ::boost::iterators::detail::is_numeric_impl<T>::value>
{};

# if defined(BOOST_HAS_LONG_LONG)
Expand Down Expand Up @@ -116,7 +109,7 @@ namespace detail
{
typedef typename detail::ia_dflt_help<
CategoryOrTraversal
, typename boost::conditional<
, typename std::conditional<
is_numeric<Incrementable>::value
, boost::type_identity<random_access_traversal_tag>
, iterator_traversal<Incrementable>
Expand All @@ -125,7 +118,7 @@ namespace detail

typedef typename detail::ia_dflt_help<
Difference
, typename boost::conditional<
, typename std::conditional<
is_numeric<Incrementable>::value
, numeric_difference<Incrementable>
, iterator_difference<Incrementable>
Expand Down Expand Up @@ -225,7 +218,7 @@ class counting_iterator
difference_type
distance_to(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& y) const
{
typedef typename boost::conditional<
typedef typename std::conditional<
detail::is_numeric<Incrementable>::value
, detail::number_distance<difference_type, Incrementable, OtherIncrementable>
, detail::iterator_distance<difference_type, Incrementable, OtherIncrementable>
Expand Down
21 changes: 0 additions & 21 deletions include/boost/iterator/detail/any_conversion_eater.hpp

This file was deleted.

82 changes: 1 addition & 81 deletions include/boost/iterator/detail/config_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,83 +45,4 @@

#endif

#if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x5A0)) \
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|| BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \
|| 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

#if BOOST_WORKAROUND(__MWERKS__, <=0x2407)
# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types"
#endif

#if BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \
|| BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x551))
# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile:

# if 0 // test code
#include <boost/type_traits/is_convertible.hpp>
template <class T>
struct foo
{
foo(T);

template <class U>
foo(foo<U> const& other) : p(other.p) { }

T p;
};

bool x = boost::is_convertible<foo<int const*>, foo<int*> >::value;
# endif

#endif


#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE))
# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
#endif

# if BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x564))

// GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion
// operators in convertibility checks, causing premature errors.
//
// Borland's problems are harder to diagnose due to lack of an
// instantiation stack backtrace. They may be due in part to the fact
// that it drops cv-qualification willy-nilly in templates.
# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP
# endif

// no include guard; multiple inclusion intended
6 changes: 1 addition & 5 deletions include/boost/iterator/detail/config_undef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
// 23/02/03 thw
//

#undef BOOST_NO_IS_CONVERTIBLE
#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE
#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
#undef BOOST_NO_LVALUE_RETURN_DETECTION
#undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
#undef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY

#ifdef BOOST_ITERATOR_CONFIG_DEF
# undef BOOST_ITERATOR_CONFIG_DEF
Expand Down
Loading