Skip to content

Commit

Permalink
Work around Windows min/max macro problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dvj authored and henryiii committed Jul 6, 2018
1 parent 20c304f commit 8961df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/CLI/Option.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ class Option : public OptionBase<Option> {

// Num items expected or length of vector, always at least 1
// Only valid for a trimming policy
int trim_size = std::min(std::max(std::abs(get_items_expected()), 1), static_cast<int>(results_.size()));
int trim_size =
std::min<int>(std::max<int>(std::abs(get_items_expected()), 1), static_cast<int>(results_.size()));

// Operation depends on the policy setting
if(multi_option_policy_ == MultiOptionPolicy::TakeLast) {
Expand Down

0 comments on commit 8961df0

Please sign in to comment.