Skip to content

Commit

Permalink
Use std::min type specialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuvi-w authored Aug 4, 2021
1 parent 14fd4c6 commit 0652496
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 0652496

Please sign in to comment.