$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r71081 - trunk/boost/units
From: steven_at_[hidden]
Date: 2011-04-07 10:50:54
Author: steven_watanabe
Date: 2011-04-07 10:50:53 EDT (Thu, 07 Apr 2011)
New Revision: 71081
URL: http://svn.boost.org/trac/boost/changeset/71081
Log:
Fix checking for double registration with clang in C++0x mode.  Fixes #5436.
Text files modified: 
   trunk/boost/units/base_dimension.hpp |    10 ++++++++++                              
   trunk/boost/units/base_unit.hpp      |    10 ++++++++++                              
   2 files changed, 20 insertions(+), 0 deletions(-)
Modified: trunk/boost/units/base_dimension.hpp
==============================================================================
--- trunk/boost/units/base_dimension.hpp	(original)
+++ trunk/boost/units/base_dimension.hpp	2011-04-07 10:50:53 EDT (Thu, 07 Apr 2011)
@@ -77,6 +77,16 @@
         typedef Derived type;
 
     private:
+        /// Check for C++0x.  In C++0x, we have to have identical
+        /// arguments but a different return type to trigger an
+        /// error.  Note that this is only needed for clang as
+        /// check_base_dimension will trigger an error earlier
+        /// for compilers with less strict name lookup.
+        /// INTERNAL ONLY
+        friend Derived* 
+        check_double_register(const units::base_dimension_ordinal<N>&) 
+        { return(0); }
+
         /// Register this ordinal
         /// INTERNAL ONLY
         friend detail::yes 
Modified: trunk/boost/units/base_unit.hpp
==============================================================================
--- trunk/boost/units/base_unit.hpp	(original)
+++ trunk/boost/units/base_unit.hpp	2011-04-07 10:50:53 EDT (Thu, 07 Apr 2011)
@@ -98,6 +98,16 @@
 #endif
 
     private:
+        /// Check for C++0x.  In C++0x, we have to have identical
+        /// arguments but a different return type to trigger an
+        /// error.  Note that this is only needed for clang as
+        /// check_base_unit will trigger an error earlier
+        /// for compilers with less strict name lookup.
+        /// INTERNAL ONLY
+        friend Derived* 
+        check_double_register(const units::base_unit_ordinal<N>&) 
+        { return(0); }
+
         /// Register this ordinal
         /// INTERNAL ONLY
         friend detail::yes