Adjust constexpr qualifiers so they work in gcc < 4.9.

This commit is contained in:
David L. Jones 2022-05-19 16:57:17 -07:00
parent 7f2368933a
commit 053f698e90

View File

@ -165,14 +165,14 @@ int64_t RoundTowardZero(int64_t value, int64_t divider) {
// Actually define these static const integers. Required by C++ standard (but
// some compilers don't like it).
#ifndef _MSC_VER
const int64_t TimeUtil::kTimestampMinSeconds;
const int64_t TimeUtil::kTimestampMaxSeconds;
const int32_t TimeUtil::kTimestampMinNanoseconds;
const int32_t TimeUtil::kTimestampMaxNanoseconds;
const int64_t TimeUtil::kDurationMaxSeconds;
const int64_t TimeUtil::kDurationMinSeconds;
const int32_t TimeUtil::kDurationMaxNanoseconds;
const int32_t TimeUtil::kDurationMinNanoseconds;
constexpr int64_t TimeUtil::kTimestampMinSeconds;
constexpr int64_t TimeUtil::kTimestampMaxSeconds;
constexpr int32_t TimeUtil::kTimestampMinNanoseconds;
constexpr int32_t TimeUtil::kTimestampMaxNanoseconds;
constexpr int64_t TimeUtil::kDurationMaxSeconds;
constexpr int64_t TimeUtil::kDurationMinSeconds;
constexpr int32_t TimeUtil::kDurationMaxNanoseconds;
constexpr int32_t TimeUtil::kDurationMinNanoseconds;
#endif // !_MSC_VER
std::string TimeUtil::ToString(const Timestamp& timestamp) {