diff options
Diffstat (limited to 'absl/time')
-rw-r--r-- | absl/time/internal/test_util.cc | 3 | ||||
-rw-r--r-- | absl/time/time.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/absl/time/internal/test_util.cc b/absl/time/internal/test_util.cc index 59166a7c82dd..fbddbb733698 100644 --- a/absl/time/internal/test_util.cc +++ b/absl/time/internal/test_util.cc @@ -116,7 +116,10 @@ std::unique_ptr<cctz::ZoneInfoSource> TestFactory( } // namespace +#if !defined(__MINGW32__) +// MinGW does not support the weak symbol extension mechanism. ZoneInfoSourceFactory zone_info_source_factory = TestFactory; +#endif } // namespace cctz_extension } // namespace time_internal diff --git a/absl/time/time.h b/absl/time/time.h index 46ac26b3c0d2..be0648134efd 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -1412,8 +1412,7 @@ constexpr Duration FromInt64(int64_t v, std::ratio<3600>) { // IsValidRep64<T>(0) is true if the expression `int64_t{std::declval<T>()}` is // valid. That is, if a T can be assigned to an int64_t without narrowing. template <typename T> -constexpr auto IsValidRep64(int) - -> decltype(int64_t{std::declval<T>()}, bool()) { +constexpr auto IsValidRep64(int) -> decltype(int64_t{std::declval<T>()} == 0) { return true; } template <typename T> |