Commit 8961df0e8b00c05cc586abcedf3bfe940af953e2

Authored by Doug Johnston
Committed by Henry Schreiner
1 parent 20c304fa

Work around Windows min/max macro problem

Showing 1 changed file with 2 additions and 1 deletions
include/CLI/Option.hpp
... ... @@ -546,7 +546,8 @@ class Option : public OptionBase<Option> {
546 546  
547 547 // Num items expected or length of vector, always at least 1
548 548 // Only valid for a trimming policy
549   - int trim_size = std::min(std::max(std::abs(get_items_expected()), 1), static_cast<int>(results_.size()));
  549 + int trim_size =
  550 + std::min<int>(std::max<int>(std::abs(get_items_expected()), 1), static_cast<int>(results_.size()));
550 551  
551 552 // Operation depends on the policy setting
552 553 if(multi_option_policy_ == MultiOptionPolicy::TakeLast) {
... ...