vcpkg/ports/cctz/fix_vs177.patch
jim wang 64750c8977
[cctz] Fix compilation error when vs version is greater than 17.7 (#36097)
* Fix compilation errors for VS versions greater than 17.7

* update version
2024-01-10 17:14:28 -08:00

19 lines
783 B
Diff

diff --git a/include/cctz/civil_time_detail.h b/include/cctz/civil_time_detail.h
index decc5f2..26c5aef 100644
--- a/include/cctz/civil_time_detail.h
+++ b/include/cctz/civil_time_detail.h
@@ -353,11 +353,11 @@ class civil_time {
: civil_time(ct.f_) {}
// Factories for the maximum/minimum representable civil_time.
- static CONSTEXPR_F civil_time (max)() {
+ static CONSTEXPR_F auto (max)() -> civil_time {
const auto max_year = (std::numeric_limits<std::int_least64_t>::max)();
return civil_time(max_year, 12, 31, 23, 59, 59);
}
- static CONSTEXPR_F civil_time (min)() {
+ static CONSTEXPR_F auto (min)() -> civil_time {
const auto min_year = (std::numeric_limits<std::int_least64_t>::min)();
return civil_time(min_year, 1, 1, 0, 0, 0);
}