Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61667 - trunk/boost/interprocess/containers/container/detail
From: dgregor_at_[hidden]
Date: 2010-04-28 20:54:27


Author: dgregor
Date: 2010-04-28 20:54:26 EDT (Wed, 28 Apr 2010)
New Revision: 61667
URL: http://svn.boost.org/trac/boost/changeset/61667

Log:
Standards-conformance fix for Boost.Interprocess: max_value needs to
be declared before it is used, since ADL won't look here.

Text files modified:
   trunk/boost/interprocess/containers/container/detail/utilities.hpp | 16 ++++++++--------
   1 files changed, 8 insertions(+), 8 deletions(-)

Modified: trunk/boost/interprocess/containers/container/detail/utilities.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/utilities.hpp (original)
+++ trunk/boost/interprocess/containers/container/detail/utilities.hpp 2010-04-28 20:54:26 EDT (Wed, 28 Apr 2010)
@@ -24,6 +24,14 @@
 namespace container {
 namespace containers_detail {
 
+template<class T>
+const T &max_value(const T &a, const T &b)
+{ return a > b ? a : b; }
+
+template<class T>
+const T &min_value(const T &a, const T &b)
+{ return a < b ? a : b; }
+
 template <class SizeType>
 SizeType
    get_next_capacity(const SizeType max_size
@@ -44,14 +52,6 @@
    return max_size;
 }
 
-template<class T>
-const T &max_value(const T &a, const T &b)
-{ return a > b ? a : b; }
-
-template<class T>
-const T &min_value(const T &a, const T &b)
-{ return a < b ? a : b; }
-
 template<class SmartPtr>
 struct smart_ptr_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