Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81690 - in trunk: boost/coroutine/detail libs/coroutine/example/asio
From: oliver.kowalke_at_[hidden]
Date: 2012-12-03 07:17:53


Author: olli
Date: 2012-12-03 07:17:51 EST (Mon, 03 Dec 2012)
New Revision: 81690
URL: http://svn.boost.org/trac/boost/changeset/81690

Log:
coroutine: bugfix regarding to min/max MACROS from MS

Text files modified:
   trunk/boost/coroutine/detail/stack_allocator_posix.hpp | 2 +-
   trunk/boost/coroutine/detail/stack_allocator_windows.hpp | 6 ++----
   trunk/libs/coroutine/example/asio/stream_client.cpp | 2 +-
   trunk/libs/coroutine/example/asio/stream_server.cpp | 2 +-
   4 files changed, 5 insertions(+), 7 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-03 07:17:51 EST (Mon, 03 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-03 07:17:51 EST (Mon, 03 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

Modified: trunk/libs/coroutine/example/asio/stream_client.cpp
==============================================================================
--- trunk/libs/coroutine/example/asio/stream_client.cpp (original)
+++ trunk/libs/coroutine/example/asio/stream_client.cpp 2012-12-03 07:17:51 EST (Mon, 03 Dec 2012)
@@ -29,7 +29,7 @@
                 desc),
             vm);
         boost::program_options::notify( vm);
-
+
         if ( vm.count("help") ) {
             std::cout << desc << std::endl;
             return EXIT_SUCCESS;

Modified: trunk/libs/coroutine/example/asio/stream_server.cpp
==============================================================================
--- trunk/libs/coroutine/example/asio/stream_server.cpp (original)
+++ trunk/libs/coroutine/example/asio/stream_server.cpp 2012-12-03 07:17:51 EST (Mon, 03 Dec 2012)
@@ -32,7 +32,7 @@
 
     int fetch_()
     {
- std::streamsize num = std::min(
+ std::streamsize num = (std::min)(
             static_cast< std::streamsize >( gptr() - eback() ), pb_size);
 
         std::memmove(


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