Remove illegal constexpr from function declaration

This commit is contained in:
dev 2025-02-28 23:01:10 +08:00
parent c4de026123
commit 5382ea7cab
3 changed files with 3 additions and 3 deletions

View File

@ -171,7 +171,7 @@ static_assert(serde::SerializableToBytes<IBConnectRsp> && serde::SerializableToJ
template <>
struct hf3fs::serde::SerdeMethod<ibv_gid> {
static constexpr std::string_view serdeTo(const ibv_gid &gid) {
static std::string_view serdeTo(const ibv_gid &gid) {
return std::string_view((const char *)&gid.raw[0], sizeof(ibv_gid::raw));
}
static Result<ibv_gid> serdeFrom(std::string_view s) {

View File

@ -7,7 +7,7 @@ namespace hf3fs::serde {
template <>
struct SerdeMethod<UtcTime> {
static constexpr auto serdeTo(UtcTime t) { return t.toMicroseconds(); }
static auto serdeTo(UtcTime t) { return t.toMicroseconds(); }
static Result<UtcTime> serdeFrom(int64_t t) { return UtcTime::fromMicroseconds(t); }
};

View File

@ -205,7 +205,7 @@ static_assert(serde::Serializable<ChecksumInfo>);
template <>
struct ::hf3fs::serde::SerdeMethod<::hf3fs::storage::ChunkId> {
static constexpr std::string_view serdeTo(const storage::ChunkId &chunkId) { return chunkId.data(); }
static std::string_view serdeTo(const storage::ChunkId &chunkId) { return chunkId.data(); }
static Result<storage::ChunkId> serdeFrom(std::string_view str) { return storage::ChunkId(str); }
static std::string serdeToReadable(const storage::ChunkId &chunkId) { return chunkId.describe(); };
static Result<storage::ChunkId> serdeFromReadable(std::string_view s) { return storage::ChunkId::fromString(s); }