Fix ranges::min and ranges::max errors ()

This commit is contained in:
Jasmine 2025-02-18 00:24:29 -05:00 committed by GitHub
parent 59cb84fd40
commit cdb78f6c48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -238,7 +238,7 @@ namespace geode::utils::ranges {
typename C::value_type min(C const& container) {
auto it = std::min_element(container.begin(), container.end());
if (it == container.end()) {
return C::value_type();
return typename C::value_type();
}
return *it;
}
@ -264,7 +264,7 @@ namespace geode::utils::ranges {
typename C::value_type max(C const& container) {
auto it = std::max_element(container.begin(), container.end());
if (it == container.end()) {
return C::value_type();
return typename C::value_type();
}
return *it;
}