Opened 8 years ago

Closed 7 years ago

#10917 closed Bugs (fixed)

min conflict in transform_width.hpp

Reported by: lordoffox@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc: VC, 2008

Description

line 156: unsigned int i = std::min(missing_bits, m_remaining_bits);

maybe use: unsigned int i = (std::min)(missing_bits, m_remaining_bits);

Change History (4)

comment:1 by Michel Morin, 8 years ago

Component: iteratorserialization
Owner: changed from jeffrey.hellrung to Robert Ramey

comment:2 by anonymous, 8 years ago

could you give a little more info? Compile time/Runtime error, error message, etc....

comment:3 by Michel Morin, 8 years ago

Boost has documentation for it:

Make sure your code compiles in the presence of the min() and max() macros. Some platform headers define min() and max() macros which cause some common C++ constructs to fail to compile. Some simple tricks can protect your code from inappropriate macro substitution:

  • If you want to call std::min() or std::max():
    • If you do not require argument-dependent look-up, use (std::min)(a,b).

...

comment:4 by Robert Ramey, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.