Skip to content

Commit

Permalink
Merge pull request #109 from Chuvi-w/fix_std_min_conflict
Browse files Browse the repository at this point in the history
Fix std::min conflict with min/max definitions from windows.h
  • Loading branch information
p-ranav authored Aug 5, 2021
2 parents e1ea7ec + 0652496 commit 801e2ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ template <typename T> std::string repr(T const &val) {
out << repr(*val.begin());
std::for_each(
std::next(val.begin()),
std::next(val.begin(), std::min(size, repr_max_container_size) - 1),
std::next(val.begin(), std::min<size_t>(size, repr_max_container_size) - 1),
[&out](const auto &v) { out << " " << repr(v); });
if (size <= repr_max_container_size)
out << " ";
Expand Down

0 comments on commit 801e2ef

Please sign in to comment.