Use std::min type specialisation

This commit is contained in:
Chuvi 2021-08-04 19:43:20 +03:00 committed by GitHub
parent 14fd4c6d5b
commit 0652496435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ template <typename T> std::string repr(T const &val) {
out << repr(*val.begin()); out << repr(*val.begin());
std::for_each( std::for_each(
std::next(val.begin()), 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); }); [&out](const auto &v) { out << " " << repr(v); });
if (size <= repr_max_container_size) if (size <= repr_max_container_size)
out << " "; out << " ";