Skip to content

Conversation

Tsche
Copy link
Member

@Tsche Tsche commented Sep 11, 2025

No description provided.

Copy link
Member

@Yaraslaut Yaraslaut left a comment

Choose a reason for hiding this comment

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

Some comments, great addition to the library, also need to find a place for the documentation, at least some minimal

Comment on lines +10 to +14
# add_executable(example_review
# review.cpp
# review_tu2.cpp
# )
# target_link_libraries(example_review PRIVATE rsl_util)
Copy link
Member

Choose a reason for hiding this comment

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

maybe just remove it, no need for keeping commented out code

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I should probably re-enable that. I think something there broke, gonna take a look in a different PR

Comment on lines +45 to +48
[[nodiscard]] std::string with_style(StyleMap const& style) const {
return (this->*join)(&style);
}
[[nodiscard]] std::string unstyled() const { return (this->*join)(nullptr); }
Copy link
Member

Choose a reason for hiding this comment

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

I guess better to have more consistent naming, if we have with_style than unstyled should be without_style, or the with_style should become styled

}

if (!consume(']')) {
// std::println("missing closing ]");
Copy link
Member

Choose a reason for hiding this comment

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

remove before merging

Comment on lines +21 to +27
consteval explicit operator std::meta::info() const {
auto args = std::vector<rsl::string_view>();
for (auto const& tag : tags) {
args.emplace_back(std::define_static_string(tag));
}
return std::meta::reflect_constant(Tag{std::define_static_array(args), enable});
}
Copy link
Member

Choose a reason for hiding this comment

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

oh, this is interesting hack

Comment on lines +11 to +13
std::vector<std::string_view> names = nonstatic_data_members_of(type, std::meta::access_context::current()) |
std::views::transform(std::meta::identifier_of) |
std::ranges::to<std::vector>();
Copy link
Member

Choose a reason for hiding this comment

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

hm, will this get cached for the same type as with template instantiation or this will be evaluated every time ?

{"magenta", "\x1b[35m"},
{ "cyan", "\x1b[36m"},
{ "white", "\x1b[37m"},
{"default", "\x1b[3m8"}
Copy link
Member

Choose a reason for hiding this comment

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

typo

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