diff --git a/src/common/net/ib/IBConnect.h b/src/common/net/ib/IBConnect.h index 828de35..1aba684 100644 --- a/src/common/net/ib/IBConnect.h +++ b/src/common/net/ib/IBConnect.h @@ -171,7 +171,7 @@ static_assert(serde::SerializableToBytes && serde::SerializableToJ template <> struct hf3fs::serde::SerdeMethod { - 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 serdeFrom(std::string_view s) { diff --git a/src/common/utils/UtcTimeSerde.h b/src/common/utils/UtcTimeSerde.h index e3cdfc1..335947c 100644 --- a/src/common/utils/UtcTimeSerde.h +++ b/src/common/utils/UtcTimeSerde.h @@ -7,7 +7,7 @@ namespace hf3fs::serde { template <> struct SerdeMethod { - static constexpr auto serdeTo(UtcTime t) { return t.toMicroseconds(); } + static auto serdeTo(UtcTime t) { return t.toMicroseconds(); } static Result serdeFrom(int64_t t) { return UtcTime::fromMicroseconds(t); } }; diff --git a/src/fbs/storage/Common.h b/src/fbs/storage/Common.h index 6750fd8..cfccfc1 100644 --- a/src/fbs/storage/Common.h +++ b/src/fbs/storage/Common.h @@ -205,7 +205,7 @@ static_assert(serde::Serializable); 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 serdeFrom(std::string_view str) { return storage::ChunkId(str); } static std::string serdeToReadable(const storage::ChunkId &chunkId) { return chunkId.describe(); }; static Result serdeFromReadable(std::string_view s) { return storage::ChunkId::fromString(s); }