mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2026-01-04 17:21:07 +07:00
foreach by info internals
This commit is contained in:
@@ -150,6 +150,13 @@ namespace meta_hpp
|
||||
return cinvoke_(instance, vargs.data(), vargs.size());
|
||||
}
|
||||
|
||||
template < typename F >
|
||||
void each_data(F&& f) const {
|
||||
for ( auto [_, info] : datas_ ) {
|
||||
std::invoke(f, info);
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<data_info> get_data(std::string_view id) const {
|
||||
return detail::find_opt(datas_, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user