Skip to content

Commit

Permalink
Remove illegal constexpr from function declaration (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-Zhou authored Feb 28, 2025
1 parent c4de026 commit d4f244d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/net/ib/IBConnect.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/utils/UtcTimeSerde.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
};

Expand Down
2 changes: 1 addition & 1 deletion src/fbs/storage/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down

0 comments on commit d4f244d

Please sign in to comment.