Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49706 - trunk/boost/gil
From: Boris.Gubenko_at_[hidden]
Date: 2008-11-12 18:25:03


Author: bgubenko
Date: 2008-11-12 18:25:03 EST (Wed, 12 Nov 2008)
New Revision: 49706
URL: http://svn.boost.org/trac/boost/changeset/49706

Log:
add workaround for HP-UX aC++ compiler
Text files modified:
   trunk/boost/gil/planar_pixel_reference.hpp | 12 ++++++++++++
   1 files changed, 12 insertions(+), 0 deletions(-)

Modified: trunk/boost/gil/planar_pixel_reference.hpp
==============================================================================
--- trunk/boost/gil/planar_pixel_reference.hpp (original)
+++ trunk/boost/gil/planar_pixel_reference.hpp 2008-11-12 18:25:03 EST (Wed, 12 Nov 2008)
@@ -79,6 +79,18 @@
     const planar_pixel_reference& operator=(const planar_pixel_reference& p) const { static_copy(p,*this); return *this; }
     template <typename P> const planar_pixel_reference& operator=(const P& p) const { check_compatible<P>(); static_copy(p,*this); return *this; }
 
+// This overload is necessary for a compiler implementing Core Issue 574
+// to prevent generation of an implicit copy assignment operator (the reason
+// for generating implicit copy assignment operator is that according to
+// Core Issue 574, a cv-qualified assignment operator is not considered
+// "copy assignment operator").
+// EDG implemented Core Issue 574 starting with EDG Version 3.8. I'm not
+// sure why they did it for a template member function as well.
+#if BOOST_WORKAROUND(__HP_aCC, >= 61700)
+ const planar_pixel_reference& operator=(const planar_pixel_reference& p) { static_copy(p,*this); return *this; }
+ template <typename P> const planar_pixel_reference& operator=(const P& p) { check_compatible<P>(); static_copy(p,*this); return *this; }
+#endif
+
     template <typename P> bool operator==(const P& p) const { check_compatible<P>(); return static_equal(*this,p); }
     template <typename P> bool operator!=(const P& p) const { return !(*this==p); }
 


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