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

aggregate to yaml and refactor yaml_writer #325

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

siriuslzx
Copy link

No description provided.

@qicosmos
Copy link
Owner

yaml_reader 不一起重构吗?

@siriuslzx
Copy link
Author

yaml_reader 不一起重构吗?

需要一些时间

IGUANA_INLINE void render_yaml_value(Stream &ss, const T &val,
size_t min_spaces) {
std::enable_if_t<smart_ptr_v<T>, int> = 0>
IGUANA_INLINE void render_yaml_wrapper(Stream &ss, const T &val,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个名字我觉得不要改的好,用wrapper不知道是啥意思。

std::enable_if_t<refletable_v<T>, int>>
IGUANA_INLINE void to_yaml(T &&t, Stream &s, size_t min_spaces) {
std::enable_if_t<refletable_v<T>, int> = 0>
IGUANA_INLINE void render_yaml_struct(Stream &s, T &&t, size_t min_spaces) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里还是用render_yaml_value比较好,统一成这个名字。
struct语义是不明确的,tuple 也算是struct的。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除了函数名之外,我觉得其它的地方没啥问题。

@qicosmos qicosmos merged commit 71d70f6 into qicosmos:refactor_reflection Nov 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants