Merge pull request #109 from Chuvi-w/fix_std_min_conflict

Fix std::min conflict with min/max definitions from windows.h
This commit is contained in:
Pranav 2021-08-05 07:23:43 -05:00 committed by GitHub
commit 801e2ef343
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 << " ";