forked from boostorg/iterator
Revert changes that were merged to master.
Reverted: 2e099caceb9..21102938e8ccb I'm going to reapply some of them soon, but it's easier to revert them all first, as there are conflicts. Also the number of changes that were inserted since then, mean that there would be a huge gap between related changes.
This commit is contained in:
@ -10,8 +10,18 @@
|
||||
|
||||
namespace boost {
|
||||
|
||||
// Obsolete. Remove.
|
||||
#define BOOST_ITERATOR_CATEGORY iterator_category
|
||||
// Unfortunately, g++ 2.95.x chokes when we define a class template
|
||||
// iterator_category which has the same name as its
|
||||
// std::iterator_category() function, probably due in part to the
|
||||
// "std:: is visible globally" hack it uses. Use
|
||||
// BOOST_ITERATOR_CATEGORY to write code that's portable to older
|
||||
// GCCs.
|
||||
|
||||
# if BOOST_WORKAROUND(__GNUC__, <= 2)
|
||||
# define BOOST_ITERATOR_CATEGORY iterator_category_
|
||||
# else
|
||||
# define BOOST_ITERATOR_CATEGORY iterator_category
|
||||
# endif
|
||||
|
||||
|
||||
template <class Iterator>
|
||||
@ -40,11 +50,43 @@ struct iterator_difference
|
||||
};
|
||||
|
||||
template <class Iterator>
|
||||
struct iterator_category
|
||||
struct BOOST_ITERATOR_CATEGORY
|
||||
{
|
||||
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct iterator_value<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_reference<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_pointer<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_difference<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct BOOST_ITERATOR_CATEGORY<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
# endif
|
||||
|
||||
} // namespace boost::iterator
|
||||
|
||||
#endif // ITERATOR_TRAITS_DWA200347_HPP
|
||||
|
Reference in New Issue
Block a user