Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81789 - trunk/boost/coroutine/detail
From: oliver.kowalke_at_[hidden]
Date: 2012-12-08 06:38:13


Author: olli
Date: 2012-12-08 06:38:12 EST (Sat, 08 Dec 2012)
New Revision: 81789
URL: http://svn.boost.org/trac/boost/changeset/81789

Log:
coroutine: fix min/max problem (Windows macros)

Text files modified:
   trunk/boost/coroutine/detail/stack_allocator_posix.hpp | 2 +-
   trunk/boost/coroutine/detail/stack_allocator_windows.hpp | 6 ++----
   2 files changed, 3 insertions(+), 5 deletions(-)

Modified: trunk/boost/coroutine/detail/stack_allocator_posix.hpp
==============================================================================
--- trunk/boost/coroutine/detail/stack_allocator_posix.hpp (original)
+++ trunk/boost/coroutine/detail/stack_allocator_posix.hpp 2012-12-08 06:38:12 EST (Sat, 08 Dec 2012)
@@ -93,7 +93,7 @@
         BOOST_ASSERT( maximum_stacksize() >= minimum_stacksize() );
         return maximum_stacksize() == size
             ? size
- : std::min( size, maximum_stacksize() );
+ : (std::min)( size, maximum_stacksize() );
     }
 
     static std::size_t minimum_stacksize()

Modified: trunk/boost/coroutine/detail/stack_allocator_windows.hpp
==============================================================================
--- trunk/boost/coroutine/detail/stack_allocator_windows.hpp (original)
+++ trunk/boost/coroutine/detail/stack_allocator_windows.hpp 2012-12-08 06:38:12 EST (Sat, 08 Dec 2012)
@@ -89,16 +89,14 @@
 
     static std::size_t default_stacksize()
     {
- using namespace std;
-
         std::size_t size = 64 * 1024; // 64 kB
         if ( is_stack_unbound() )
- return max( size, minimum_stacksize() );
+ return (std::max)( size, minimum_stacksize() );
 
         BOOST_ASSERT( maximum_stacksize() >= minimum_stacksize() );
         return maximum_stacksize() == minimum_stacksize()
             ? minimum_stacksize()
- : min( size, maximum_stacksize() );
+ : ( std::min)( size, maximum_stacksize() );
     }
 
     // because Windows seams not to provide a limit for minimum stacksize


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