Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81790 - branches/release/boost/coroutine/detail
From: oliver.kowalke_at_[hidden]
Date: 2012-12-08 06:40:03


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

Log:
coroutine: fix min/max problem triggered by Windows min/max macros

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

Modified: branches/release/boost/coroutine/detail/stack_allocator_posix.hpp
==============================================================================
--- branches/release/boost/coroutine/detail/stack_allocator_posix.hpp (original)
+++ branches/release/boost/coroutine/detail/stack_allocator_posix.hpp 2012-12-08 06:40:02 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: branches/release/boost/coroutine/detail/stack_allocator_windows.hpp
==============================================================================
--- branches/release/boost/coroutine/detail/stack_allocator_windows.hpp (original)
+++ branches/release/boost/coroutine/detail/stack_allocator_windows.hpp 2012-12-08 06:40:02 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