RFoe / coasync

Asynchronous network library that supports coroutines in C++20
https://github.com/RFoe/coasync
MIT License
18 stars 3 forks source link

给结构体自定义序列化的元信息注册写一个便利的宏 #2

Closed RFoe closed 6 days ago

RFoe commented 4 weeks ago

https://github.com/RFoe/coasync/blob/a466688370ce4bc5feefc8a55d960de447dfbfde/include/coasync/detail/meta/member_field.hpp#L12 https://github.com/RFoe/coasync/blob/a466688370ce4bc5feefc8a55d960de447dfbfde/include/coasync/detail/meta/serde_stream_base.hpp#L252

或许是这样

struct X {int a; int b; };

COASYNC_META((X), (a), (b))