Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: improve protobuf concept #39

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions modules/serdes/include/hephaestus/serdes/protobuf/concepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
namespace heph::serdes::protobuf {

template <class T>
struct ProtoAssociation {
using Type = void;
};
struct ProtoAssociation {};

template <typename T>
concept ProtobufMessage = requires(T proto, void* out_data, const void* in_data, int size) {
Expand Down
6 changes: 1 addition & 5 deletions modules/serdes/include/hephaestus/serdes/serdes.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
namespace heph::serdes {

template <class T>
concept ProtobufSerializable = requires(T data) {
{ !std::is_same_v<typename protobuf::ProtoAssociation<T>::Type, void> };
};

// ProtoAssociation<T>::Type
concept ProtobufSerializable = protobuf::ProtobufMessage<typename protobuf::ProtoAssociation<T>::Type>;

template <class T>
[[nodiscard]] auto serialize(const T& data) -> std::vector<std::byte>;
Expand Down
6 changes: 3 additions & 3 deletions modules/utils/src/version_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ static constexpr std::uint8_t VERSION_MAJOR = 0;
static constexpr std::uint8_t VERSION_MINOR = 0;
static constexpr std::uint16_t VERSION_PATCH = 1;

static constexpr std::string_view REPO_BRANCH = "feature/spinner";
static constexpr std::string_view BUILD_PROFILE = "RelWithDebInfo";
static constexpr std::string_view REPO_HASH = "6b4f737";
static constexpr std::string_view REPO_BRANCH = "fix/proto_concept";
static constexpr std::string_view BUILD_PROFILE = "Release";
static constexpr std::string_view REPO_HASH = "900c283";

} // namespace heph::utils
Loading