mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-21 16:42:09 +02:00
@ -7,16 +7,13 @@
|
|||||||
#include <boost/iterator/iterator_categories.hpp>
|
#include <boost/iterator/iterator_categories.hpp>
|
||||||
#include <boost/operators.hpp>
|
#include <boost/operators.hpp>
|
||||||
|
|
||||||
#include <iterator>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
struct new_random_access
|
struct new_random_access
|
||||||
: std::random_access_iterator_tag
|
: std::random_access_iterator_tag
|
||||||
, boost::random_access_traversal_tag
|
, boost::random_access_traversal_tag
|
||||||
{};
|
{};
|
||||||
|
|
||||||
struct new_iterator
|
struct new_iterator
|
||||||
: public std::iterator< new_random_access, int >
|
: public boost::iterator< new_random_access, int >
|
||||||
{
|
{
|
||||||
int& operator*() const { return *m_x; }
|
int& operator*() const { return *m_x; }
|
||||||
new_iterator& operator++() { return *this; }
|
new_iterator& operator++() { return *this; }
|
||||||
@ -36,7 +33,7 @@ struct new_iterator
|
|||||||
new_iterator operator+(std::ptrdiff_t, new_iterator x) { return x; }
|
new_iterator operator+(std::ptrdiff_t, new_iterator x) { return x; }
|
||||||
|
|
||||||
struct old_iterator
|
struct old_iterator
|
||||||
: public std::iterator<std::random_access_iterator_tag, int>
|
: public boost::iterator<std::random_access_iterator_tag, int>
|
||||||
{
|
{
|
||||||
int& operator*() const { return *m_x; }
|
int& operator*() const { return *m_x; }
|
||||||
old_iterator& operator++() { return *this; }
|
old_iterator& operator++() { return *this; }
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <iterator>
|
|
||||||
|
|
||||||
#if !defined(__SGI_STL_PORT) \
|
#if !defined(__SGI_STL_PORT) \
|
||||||
&& (defined(BOOST_MSVC_STD_ITERATOR) \
|
&& (defined(BOOST_MSVC_STD_ITERATOR) \
|
||||||
@ -165,7 +164,7 @@ main()
|
|||||||
|
|
||||||
BOOST_STATIC_ASSERT(
|
BOOST_STATIC_ASSERT(
|
||||||
has_element_type<
|
has_element_type<
|
||||||
std::iterator_traits<shared_t::iterator>::value_type
|
boost::detail::iterator_traits<shared_t::iterator>::value_type
|
||||||
>::value
|
>::value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user