#7995 closed Bugs (fixed)
compile error in transform_width.hpp when the min macro is defined
Reported by: | Richard Webb | Owned by: | Robert Ramey |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Change History (5)
follow-up: 2 comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Replying to ramey:
Which compiler still defines "min" as a macro?
Visual Studio 2008, when including the windows headers without defining NOMINMAX first (I normally do, but in this case the code is using WTL, and that breaks if the macro isn't defined).
Thanks for fixing it in any case.
comment:4 by , 9 years ago
Please reopen this bug as this bug perists with boost 1.55 and Visual Studio 8 2005.
Note:
See TracTickets
for help on using tickets.
Which compiler still defines "min" as a macro?
In any case, your adjustment seems harmless, so I'll roll it in