Opened 8 years ago
Closed 7 years ago
#10917 closed Bugs (fixed)
min conflict in transform_width.hpp
Reported by: | 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 , 8 years ago
Component: | iterator → serialization |
---|---|
Owner: | changed from | to
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Boost has documentation for it:
Make sure your code compiles in the presence of the
min()
andmax()
macros. Some platform headers definemin()
andmax()
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()
orstd::max()
:- If you do not require argument-dependent look-up, use
(std::min)(a,b)
.
- If you do not require argument-dependent look-up, use
...
comment:4 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
could you give a little more info? Compile time/Runtime error, error message, etc....