Skip to content

Commit 0efb385

Browse files
MarcelRaadvprus
authored andcommitted
Protect against max macro
This fixes compilation for MSVC in the case when NOMINMAX is not defined and the program_options include appears after the windows.h include.
1 parent 2c4d25a commit 0efb385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/program_options/value_semantic.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ namespace boost { namespace program_options {
320320

321321
unsigned max_tokens() const {
322322
if (m_multitoken) {
323-
return std::numeric_limits<unsigned>::max();
323+
return std::numeric_limits<unsigned>::max BOOST_PREVENT_MACRO_SUBSTITUTION();
324324
} else if (m_zero_tokens) {
325325
return 0;
326326
} else {

0 commit comments

Comments
 (0)