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

[struct_pack] refact marco #878

Merged
merged 4 commits into from
Jan 14, 2025
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
2 changes: 1 addition & 1 deletion include/ylt/coro_rpc/impl/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ struct rpc_error {
const uint16_t& val() const { return *(uint16_t*)&(code.ec); }
constexpr operator bool() const noexcept { return code; }
};
STRUCT_PACK_REFL(rpc_error, val(), msg);
YLT_REFL(rpc_error, val(), msg);

}; // namespace coro_rpc
4 changes: 3 additions & 1 deletion include/ylt/reflection/internal/arg_list_macro.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma once
#include "common_macro.hpp"

#define YLT_MACRO_EXPAND(...) __VA_ARGS__

#define WRAP_ARGS0(w, o)
#define WRAP_ARGS1(w, o, _1) w(o, _1)
#include "generate/arg_list_macro_gen.hpp"

#define WRAP_ARGS_(w, object, ...) \
YLT_CONCAT(WRAP_ARGS, YLT_ARG_COUNT(__VA_ARGS__)) \
(w, object, ##__VA_ARGS__)
#define WRAP_ARGS(w, object, ...) WRAP_ARGS_(w, object, ##__VA_ARGS__)
#define WRAP_ARGS(w, object, ...) WRAP_ARGS_(w, object, ##__VA_ARGS__)
55 changes: 0 additions & 55 deletions include/ylt/reflection/internal/args_count.hpp

This file was deleted.

1 change: 0 additions & 1 deletion include/ylt/reflection/internal/common_macro.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
#include "args_count.hpp"
#define YLT_CONCAT_(l, r) l##r

#define YLT_CONCAT(l, r) YLT_CONCAT_(l, r)
Expand Down
Loading
Loading