Skip to content

Commit a7afb81

Browse files
committed
[struct_pack] refact marco
1 parent e424dca commit a7afb81

25 files changed

+507
-2219
lines changed

include/ylt/coro_rpc/impl/errno.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ struct rpc_error {
115115
const uint16_t& val() const { return *(uint16_t*)&(code.ec); }
116116
constexpr operator bool() const noexcept { return code; }
117117
};
118-
STRUCT_PACK_REFL(rpc_error, val(), msg);
118+
YLT_REFL(rpc_error, val(), msg);
119119

120120
}; // namespace coro_rpc
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#pragma once
22
#include "common_macro.hpp"
33

4+
#define YLT_MACRO_EXPAND(...) __VA_ARGS__
5+
46
#define WRAP_ARGS0(w, o)
57
#define WRAP_ARGS1(w, o, _1) w(o, _1)
68
#include "generate/arg_list_macro_gen.hpp"
79

810
#define WRAP_ARGS_(w, object, ...) \
911
YLT_CONCAT(WRAP_ARGS, YLT_ARG_COUNT(__VA_ARGS__)) \
1012
(w, object, ##__VA_ARGS__)
11-
#define WRAP_ARGS(w, object, ...) WRAP_ARGS_(w, object, ##__VA_ARGS__)
13+
#define WRAP_ARGS(w, object, ...) WRAP_ARGS_(w, object, ##__VA_ARGS__)

include/ylt/reflection/internal/args_count.hpp

-55
This file was deleted.

include/ylt/reflection/internal/common_macro.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#pragma once
2-
#include "args_count.hpp"
32
#define YLT_CONCAT_(l, r) l##r
43

54
#define YLT_CONCAT(l, r) YLT_CONCAT_(l, r)

0 commit comments

Comments
 (0)