Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58777 - in trunk/boost/gil: . extension/dynamic_image
From: chhenning_at_[hidden]
Date: 2010-01-06 14:15:00


Author: chhenning
Date: 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
New Revision: 58777
URL: http://svn.boost.org/trac/boost/changeset/58777

Log:
Added gil:: namespace to all at_c calls. This seems necessary for current gcc ( 4.4 and more ) compilers. See #3041 and #3619.
Text files modified:
   trunk/boost/gil/bit_aligned_pixel_reference.hpp | 4 +-
   trunk/boost/gil/color_base.hpp | 46 ++++++++++++++++++++--------------------
   trunk/boost/gil/extension/dynamic_image/reduce.hpp | 2
   trunk/boost/gil/gil_concept.hpp | 6 ++--
   trunk/boost/gil/packed_pixel.hpp | 10 ++++----
   trunk/boost/gil/planar_pixel_iterator.hpp | 2
   6 files changed, 35 insertions(+), 35 deletions(-)

Modified: trunk/boost/gil/bit_aligned_pixel_reference.hpp
==============================================================================
--- trunk/boost/gil/bit_aligned_pixel_reference.hpp (original)
+++ trunk/boost/gil/bit_aligned_pixel_reference.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -169,8 +169,8 @@
 
 private:
     static void check_gray() { BOOST_STATIC_ASSERT((is_same<typename Layout::color_space_t, gray_t>::value)); }
- template <typename Channel> void assign(const Channel& chan, mpl::false_) const { check_gray(); at_c<0>(*this)=chan; }
- template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return at_c<0>(*this)==chan; }
+ template <typename Channel> void assign(const Channel& chan, mpl::false_) const { check_gray(); gil::at_c<0>(*this)=chan; }
+ template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return gil::at_c<0>(*this)==chan; }
 };
 
 /////////////////////////////

Modified: trunk/boost/gil/color_base.hpp
==============================================================================
--- trunk/boost/gil/color_base.hpp (original)
+++ trunk/boost/gil/color_base.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -85,7 +85,7 @@
     // grayscale pixel values are convertible to channel type
     operator Element () const { return _v0; }
 
- template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,1>& c) : _v0(at_c<0>(c)) {}
+ template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,1>& c) : _v0(gil::at_c<0>(c)) {}
 };
 
 
@@ -107,13 +107,13 @@
     homogeneous_color_base(Element v0, Element v1) : _v0(v0), _v1(v1) {}
 
     template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,2>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)) {}
 
     // Support for l-value reference proxy copy construction
     template <typename E2, typename L2> homogeneous_color_base( homogeneous_color_base<E2,L2,2>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)) {}
 
     // Support for planar_pixel_iterator construction and dereferencing
     template <typename P> homogeneous_color_base(P* p,bool) :
@@ -212,17 +212,17 @@
     homogeneous_color_base(Element v0, Element v1, Element v2, Element v3) : _v0(v0), _v1(v1), _v2(v2), _v3(v3) {}
 
     template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,4>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
- _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)),
- _v3(at_c<mapping_transform<Layout,L2,3>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
+ _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)),
+ _v3(gil::at_c<mapping_transform<Layout,L2,3>::value>(c)) {}
 
     // Support for l-value reference proxy copy construction
     template <typename E2, typename L2> homogeneous_color_base( homogeneous_color_base<E2,L2,4>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
- _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)),
- _v3(at_c<mapping_transform<Layout,L2,3>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
+ _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)),
+ _v3(gil::at_c<mapping_transform<Layout,L2,3>::value>(c)) {}
 
     // Support for planar_pixel_iterator construction and dereferencing
     template <typename P> homogeneous_color_base(P* p,bool) :
@@ -278,19 +278,19 @@
     homogeneous_color_base(Element v0, Element v1, Element v2, Element v3, Element v4) : _v0(v0), _v1(v1), _v2(v2), _v3(v3), _v4(v4) {}
 
     template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,5>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
- _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)),
- _v3(at_c<mapping_transform<Layout,L2,3>::value>(c)),
- _v4(at_c<mapping_transform<Layout,L2,4>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
+ _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)),
+ _v3(gil::at_c<mapping_transform<Layout,L2,3>::value>(c)),
+ _v4(gil::at_c<mapping_transform<Layout,L2,4>::value>(c)) {}
 
     // Support for l-value reference proxy copy construction
     template <typename E2, typename L2> homogeneous_color_base( homogeneous_color_base<E2,L2,5>& c) :
- _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
- _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
- _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)),
- _v3(at_c<mapping_transform<Layout,L2,3>::value>(c)),
- _v4(at_c<mapping_transform<Layout,L2,4>::value>(c)) {}
+ _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
+ _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
+ _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)),
+ _v3(gil::at_c<mapping_transform<Layout,L2,3>::value>(c)),
+ _v4(gil::at_c<mapping_transform<Layout,L2,4>::value>(c)) {}
 
     // Support for planar_pixel_iterator construction and dereferencing
     template <typename P> homogeneous_color_base(P* p,bool) :

Modified: trunk/boost/gil/extension/dynamic_image/reduce.hpp
==============================================================================
--- trunk/boost/gil/extension/dynamic_image/reduce.hpp (original)
+++ trunk/boost/gil/extension/dynamic_image/reduce.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -59,7 +59,7 @@
 
 template <typename SrcTypes, typename DstTypes, long K>
 struct at_c<mapping_vector<SrcTypes,DstTypes>, K> {
- static const std::size_t value=size<DstTypes>::value - order<DstTypes, typename at_c<SrcTypes,K>::type>::type::value +1;
+ static const std::size_t value=size<DstTypes>::value - order<DstTypes, typename gil::at_c<SrcTypes,K>::type>::type::value +1;
     typedef size_t<value> type;
 };
 

Modified: trunk/boost/gil/gil_concept.hpp
==============================================================================
--- trunk/boost/gil/gil_concept.hpp (original)
+++ trunk/boost/gil/gil_concept.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -618,7 +618,7 @@
         typedef typename kth_element_const_reference_type<ColorBase,num_elements-1>::type CR;
 
 #if !defined(_MSC_VER) || _MSC_VER > 1310
- CR cr=at_c<num_elements-1>(cb); ignore_unused_variable_warning(cr);
+ CR cr=gil::at_c<num_elements-1>(cb); ignore_unused_variable_warning(cr);
 #endif
 
         // functions that work for every pixel (no need to require them)
@@ -655,8 +655,8 @@
         typedef typename kth_element_reference_type<ColorBase, 0>::type CR;
 
 #if !defined(_MSC_VER) || _MSC_VER > 1310
- CR r=at_c<0>(cb);
- at_c<0>(cb)=r;
+ CR r=gil::at_c<0>(cb);
+ gil::at_c<0>(cb)=r;
 #endif
     }
 

Modified: trunk/boost/gil/packed_pixel.hpp
==============================================================================
--- trunk/boost/gil/packed_pixel.hpp (original)
+++ trunk/boost/gil/packed_pixel.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -77,7 +77,7 @@
     template <typename P> packed_pixel(const P& p, typename enable_if_c<is_pixel<P>::value>::type* d=0) { check_compatible<P>(); static_copy(p,*this); }
     packed_pixel(int chan0, int chan1) : _bitfield(0) {
         BOOST_STATIC_ASSERT((num_channels<packed_pixel>::value==2));
- at_c<0>(*this)=chan0; at_c<1>(*this)=chan1;
+ gil::at_c<0>(*this)=chan0; gil::at_c<1>(*this)=chan1;
     }
     packed_pixel(int chan0, int chan1, int chan2) : _bitfield(0) {
         BOOST_STATIC_ASSERT((num_channels<packed_pixel>::value==3));
@@ -106,11 +106,11 @@
 
 // Support for assignment/equality comparison of a channel with a grayscale pixel
     static void check_gray() { BOOST_STATIC_ASSERT((is_same<typename Layout::color_space_t, gray_t>::value)); }
- template <typename Channel> void assign(const Channel& chan, mpl::false_) { check_gray(); at_c<0>(*this)=chan; }
- template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return at_c<0>(*this)==chan; }
+ template <typename Channel> void assign(const Channel& chan, mpl::false_) { check_gray(); gil::at_c<0>(*this)=chan; }
+ template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return gil::at_c<0>(*this)==chan; }
 public:
- packed_pixel& operator= (int chan) { check_gray(); at_c<0>(*this)=chan; return *this; }
- bool operator==(int chan) const { check_gray(); return at_c<0>(*this)==chan; }
+ packed_pixel& operator= (int chan) { check_gray(); gil::at_c<0>(*this)=chan; return *this; }
+ bool operator==(int chan) const { check_gray(); return gil::at_c<0>(*this)==chan; }
 };
 
 /////////////////////////////

Modified: trunk/boost/gil/planar_pixel_iterator.hpp
==============================================================================
--- trunk/boost/gil/planar_pixel_iterator.hpp (original)
+++ trunk/boost/gil/planar_pixel_iterator.hpp 2010-01-06 14:14:59 EST (Wed, 06 Jan 2010)
@@ -184,7 +184,7 @@
 
 template <typename IC, typename C>
 inline std::ptrdiff_t memunit_distance(const planar_pixel_iterator<IC,C>& p1, const planar_pixel_iterator<IC,C>& p2) {
- return memunit_distance(at_c<0>(p1),at_c<0>(p2));
+ return memunit_distance(gil::at_c<0>(p1),gil::at_c<0>(p2));
 }
 
 template <typename IC>


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