[Boost-bugs] [Boost C++ Libraries] #7995: compile error in transform_width.hpp when the min macro is defined

Subject: [Boost-bugs] [Boost C++ Libraries] #7995: compile error in transform_width.hpp when the min macro is defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-06 17:49:21


#7995: compile error in transform_width.hpp when the min macro is defined
------------------------------+---------------------------------------------
 Reporter: Richard Webb | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 When trying to compile some code that uses base64_from_binary in VC9 using
 1.53, i got the errors:

 {{{
 boost\archive\iterators\transform_width.hpp(151) : error C2589: '(' :
 illegal token on right side of '::'

 boost\archive\iterators\transform_width.hpp(151) : error C2059: syntax
 error : '::'
 }}}

 Which seems to be down to the 'min' macro being defined.

 Changing line 151 to something like

 {{{
 unsigned int i = (std::min)(missing_bits, m_remaining_bits);
 }}}

 allows it to compile.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7995>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC