Remove more SUNPRO + RW's STL obsolete workarounds:

CGAL_CFG_SUNPRO_RWSTD (partially)
CGAL_reverse_iterator()
This commit is contained in:
Sylvain Pion 2008-01-03 15:04:30 +00:00
parent 5c6c3a6635
commit 2b46416907
9 changed files with 14 additions and 42 deletions

View File

@ -243,7 +243,7 @@ public:
friend class _Polyline_2<SegmentTraits_>;
};
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
/*! Get an iterator for the polyline points. */
const_iterator begin() const

View File

@ -243,7 +243,7 @@ public:
friend class _Polyline_2<SegmentTraits_>;
};
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
/*! Get an iterator for the polyline points. */
const_iterator begin() const

View File

@ -71,20 +71,12 @@ main(int,char*[])
std::vector<vertex_descriptor> predecessor(boost::num_vertices(ft));
// and then turn it into a property map
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator,
VertexIdPropertyMap
#ifdef CGAL_CFG_SUNPRO_RWSTD
,vertex_descriptor,vertex_descriptor&
#endif
>
VertexIdPropertyMap>
predecessor_pmap(predecessor.begin(), vertex_index_pmap);
std::vector<double> distance(boost::num_vertices(ft));
boost::iterator_property_map<std::vector<double>::iterator,
VertexIdPropertyMap
#ifdef CGAL_CFG_SUNPRO_RWSTD
,double,double&
#endif
>
VertexIdPropertyMap>
distance_pmap(distance.begin(), vertex_index_pmap);
// start at an arbitrary vertex

View File

@ -67,19 +67,11 @@ main(int,char*[])
// Dijkstra's shortest path needs property maps for the predecessor and distance
std::vector<vertex_descriptor> predecessor(boost::num_vertices(ft));
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator, VertexIdPropertyMap
#ifdef CGAL_CFG_SUNPRO_RWSTD
,vertex_descriptor,vertex_descriptor&
#endif
>
boost::iterator_property_map<std::vector<vertex_descriptor>::iterator, VertexIdPropertyMap>
predecessor_pmap(predecessor.begin(), vertex_index_pmap);
std::vector<double> distance(boost::num_vertices(ft));
boost::iterator_property_map<std::vector<double>::iterator, VertexIdPropertyMap
#ifdef CGAL_CFG_SUNPRO_RWSTD
,double,double&
#endif
>
boost::iterator_property_map<std::vector<double>::iterator, VertexIdPropertyMap>
distance_pmap(distance.begin(), vertex_index_pmap);
vertex_descriptor source = *boost::vertices(ft).first;

View File

@ -77,18 +77,6 @@
#endif
#ifndef CGAL_CFG_SUNPRO_RWSTD
# define CGAL_reverse_iterator(T) std::reverse_iterator< T >
#else
# define CGAL_reverse_iterator(T) std::reverse_iterator< T , \
typename T::iterator_category , \
typename T::value_type , \
typename T::reference , \
typename T::pointer , \
typename T::difference_type >
#endif
// Big endian or little endian machine.
// ====================================

View File

@ -131,8 +131,8 @@ public:
typedef typename Allocator::difference_type difference_type;
typedef CGALi::CC_iterator<Self, false> iterator;
typedef CGALi::CC_iterator<Self, true> const_iterator;
typedef CGAL_reverse_iterator(iterator) reverse_iterator;
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
friend class CGALi::CC_iterator<Self, false>;
friend class CGALi::CC_iterator<Self, true>;

View File

@ -215,8 +215,8 @@ public:
typedef CGALi::In_place_list_iterator<T, Alloc> iterator;
typedef CGALi::In_place_list_const_iterator<T, Alloc> const_iterator;
typedef CGAL_reverse_iterator(iterator) reverse_iterator;
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
typedef In_place_list<T,managed,Alloc> Self;

View File

@ -469,8 +469,8 @@ public:
friend class const_iterator;
// Define the reverse iterators:
typedef CGAL_reverse_iterator(iterator) reverse_iterator;
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
protected:

View File

@ -154,8 +154,8 @@ public:
const_iterator;
typedef vector< T, Alloc> Self;
typedef CGAL_reverse_iterator(iterator) reverse_iterator;
typedef CGAL_reverse_iterator(const_iterator) const_reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
protected:
#ifndef _MSC_VER