Fix C++20 type-tag and string timestamp regressions

This commit is contained in:
Krystie
2026-05-09 19:32:44 -07:00
parent c3e4a456d8
commit 5f61ed8fcb
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -406,7 +406,7 @@ unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nV
template<typename T, typename A>
inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion)
{
return GetSerializeSize_impl(v, nType, nVersion, std::is_fundamental_v<T>);
return GetSerializeSize_impl(v, nType, nVersion, std::is_fundamental<T>{});
}
@@ -429,7 +429,7 @@ void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVers
template<typename Stream, typename T, typename A>
inline void Serialize(Stream& os, const std::vector<T, A>& v, int nType, int nVersion)
{
Serialize_impl(os, v, nType, nVersion, std::is_fundamental_v<T>);
Serialize_impl(os, v, nType, nVersion, std::is_fundamental<T>{});
}
@@ -470,7 +470,7 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
template<typename Stream, typename T, typename A>
inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion)
{
Unserialize_impl(is, v, nType, nVersion, std::is_fundamental_v<T>);
Unserialize_impl(is, v, nType, nVersion, std::is_fundamental<T>{});
}
+2 -2
View File
@@ -405,10 +405,10 @@ inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
return pszTime;
}
constexpr std::string_view strTimestampFormat = "%Y-%m-%d %H:%M:%S UTC";
constexpr const char strTimestampFormat[] = "%Y-%m-%d %H:%M:%S UTC";
inline std::string DateTimeStrFormat(int64_t nTime)
{
return DateTimeStrFormat(strTimestampFormat.c_str(), nTime);
return DateTimeStrFormat(strTimestampFormat, nTime);
}