Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62374 - trunk/boost/gil
From: chhenning_at_[hidden]
Date: 2010-06-01 23:53:17


Author: chhenning
Date: 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
New Revision: 62374
URL: http://svn.boost.org/trac/boost/changeset/62374

Log:
Fixing potential compilation errors with newer and more standard conformant compilers when using gil and STL. Basically gil's iterators and interator adaptors are now explicit what iterator category they are belonging to, e.g. random access iterator.
Text files modified:
   trunk/boost/gil/bit_aligned_pixel_iterator.hpp | 4 ++--
   trunk/boost/gil/iterator_from_2d.hpp | 4 ++--
   trunk/boost/gil/pixel_iterator_adaptor.hpp | 4 ++--
   trunk/boost/gil/planar_pixel_iterator.hpp | 4 ++--
   trunk/boost/gil/position_iterator.hpp | 4 ++--
   5 files changed, 10 insertions(+), 10 deletions(-)

Modified: trunk/boost/gil/bit_aligned_pixel_iterator.hpp
==============================================================================
--- trunk/boost/gil/bit_aligned_pixel_iterator.hpp (original)
+++ trunk/boost/gil/bit_aligned_pixel_iterator.hpp 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
@@ -44,13 +44,13 @@
 template <typename NonAlignedPixelReference>
 struct bit_aligned_pixel_iterator : public iterator_facade<bit_aligned_pixel_iterator<NonAlignedPixelReference>,
                                                   typename NonAlignedPixelReference::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                                                   const NonAlignedPixelReference,
                                                   typename NonAlignedPixelReference::bit_range_t::difference_type> {
 private:
     typedef iterator_facade<bit_aligned_pixel_iterator<NonAlignedPixelReference>,
                             typename NonAlignedPixelReference::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                             const NonAlignedPixelReference,
                             typename NonAlignedPixelReference::bit_range_t::difference_type> parent_t;
     template <typename Ref> friend struct bit_aligned_pixel_iterator;

Modified: trunk/boost/gil/iterator_from_2d.hpp
==============================================================================
--- trunk/boost/gil/iterator_from_2d.hpp (original)
+++ trunk/boost/gil/iterator_from_2d.hpp 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
@@ -51,14 +51,14 @@
 template <typename Loc2> // Models PixelLocatorConcept
 class iterator_from_2d : public iterator_facade<iterator_from_2d<Loc2>,
                                                 typename Loc2::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                                                 typename Loc2::reference,
                                                 typename Loc2::coord_t> {
     GIL_CLASS_REQUIRE(Loc2, boost::gil, PixelLocatorConcept)
 public:
     typedef iterator_facade<iterator_from_2d<Loc2>,
                             typename Loc2::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                             typename Loc2::reference,
                             typename Loc2::coord_t> parent_t;
     typedef typename parent_t::reference reference;

Modified: trunk/boost/gil/pixel_iterator_adaptor.hpp
==============================================================================
--- trunk/boost/gil/pixel_iterator_adaptor.hpp (original)
+++ trunk/boost/gil/pixel_iterator_adaptor.hpp 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
@@ -44,7 +44,7 @@
 class dereference_iterator_adaptor : public iterator_adaptor<dereference_iterator_adaptor<Iterator,DFn>,
                                                              Iterator,
                                                              typename DFn::value_type,
- use_default,
+ typename std::iterator_traits<Iterator>::iterator_category,
                                                              typename DFn::reference,
                                                              use_default> {
     DFn _deref_fn;
@@ -52,7 +52,7 @@
     typedef iterator_adaptor<dereference_iterator_adaptor<Iterator,DFn>,
                                     Iterator,
                                     typename DFn::value_type,
- use_default,
+ typename std::iterator_traits<Iterator>::iterator_category,
                                     typename DFn::reference,
                                     use_default> parent_t;
     typedef typename DFn::result_type reference;

Modified: trunk/boost/gil/planar_pixel_iterator.hpp
==============================================================================
--- trunk/boost/gil/planar_pixel_iterator.hpp (original)
+++ trunk/boost/gil/planar_pixel_iterator.hpp 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
@@ -54,13 +54,13 @@
 template <typename ChannelPtr, typename ColorSpace>
 struct planar_pixel_iterator : public iterator_facade<planar_pixel_iterator<ChannelPtr,ColorSpace>,
                                                       pixel<typename std::iterator_traits<ChannelPtr>::value_type,layout<ColorSpace> >,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                                                       const planar_pixel_reference<typename std::iterator_traits<ChannelPtr>::reference,ColorSpace> >,
                                public detail::homogeneous_color_base<ChannelPtr,layout<ColorSpace>,mpl::size<ColorSpace>::value > {
 private:
     typedef iterator_facade<planar_pixel_iterator<ChannelPtr,ColorSpace>,
                             pixel<typename std::iterator_traits<ChannelPtr>::value_type,layout<ColorSpace> >,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                             const planar_pixel_reference<typename std::iterator_traits<ChannelPtr>::reference,ColorSpace> > parent_t;
     typedef detail::homogeneous_color_base<ChannelPtr,layout<ColorSpace>,mpl::size<ColorSpace>::value> color_base_parent_t;
     typedef typename std::iterator_traits<ChannelPtr>::value_type channel_t;

Modified: trunk/boost/gil/position_iterator.hpp
==============================================================================
--- trunk/boost/gil/position_iterator.hpp (original)
+++ trunk/boost/gil/position_iterator.hpp 2010-06-01 23:53:16 EDT (Tue, 01 Jun 2010)
@@ -39,12 +39,12 @@
           int Dim> // the dimension to advance along
 struct position_iterator : public iterator_facade<position_iterator<Deref,Dim>,
                                                   typename Deref::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                                                   typename Deref::reference,
                                                   typename Deref::argument_type::template axis<Dim>::coord_t> {
     typedef iterator_facade<position_iterator<Deref,Dim>,
                             typename Deref::value_type,
- random_access_traversal_tag,
+ std::random_access_iterator_tag,
                             typename Deref::reference,
                             typename Deref::argument_type::template axis<Dim>::coord_t> parent_t;
     typedef typename parent_t::difference_type difference_type;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk