C++ 静态反射与序列化 | SF-Zhou's Blog #198
Replies: 3 comments 5 replies
-
文中用到的 CRTP 的核心原因是想拿到当前类型,然而已经有黑科技可以通过 ADL 拿到当前的类型了:MitalAshok/self_macro,感叹 C++ 开发者们的奇思妙想。一个简短的示例:https://stackoverflow.com/questions/21143835/can-i-implement-an-autonomous-self-member-type-in-c/70701479#70701479 |
Beta Was this translation helpful? Give feedback.
4 replies
-
C++ 的发展日新月异,C++23 已经可以实现类似 Rust 的 borrow checker 了(链接),有空的时候我研究下实现。 |
Beta Was this translation helpful? Give feedback.
1 reply
-
boost::pfr 实现了更优雅的 get_name,底层原理依然是解析 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
C++ 静态反射与序列化 | SF-Zhou's Blog
https://sf-zhou.github.io/programming/cpp_static_reflection.html
Beta Was this translation helpful? Give feedback.
All reactions