@@ -12,19 +12,17 @@ namespace rsl::_impl {
1212template <std::meta::info... Members>
1313struct MemberAccessor {
1414 template <std::size_t Idx, typename S>
15- RSL_INLINE (always)
16- constexpr static decltype (auto ) get(S&& storage) noexcept {
15+ $inline (always) constexpr static decltype (auto ) get(S&& storage) noexcept {
1716 return std::forward_like<S>(storage.[:Members...[Idx]:]);
1817 }
1918
2019 template <std::size_t Idx, typename S>
21- RSL_INLINE (always)
22- constexpr static decltype (auto ) get_addr(S&& storage) noexcept {
20+ $inline (always) constexpr static decltype (auto ) get_addr(S&& storage) noexcept {
2321 return std::addressof (std::forward<S>(storage).[:Members...[Idx]:]);
2422 }
2523
26- constexpr static auto count = sizeof ...(Members);
27- constexpr static std::array<std::meta::info, count> types = {dealias (type_of (Members))...};
24+ constexpr static auto count = sizeof ...(Members);
25+ constexpr static std::array<std::meta::info, count> types = {dealias (type_of (Members))...};
2826 constexpr static std::array<std::meta::info, count> members = {Members...};
2927
3028 static consteval std::size_t get_index_of (std::meta::info needle) {
@@ -48,19 +46,19 @@ struct MemberAccessor {
4846 std::vector<std::string_view> names;
4947 names.reserve (count);
5048 for (auto member : std::vector<std::meta::info>{Members...}) {
51- if (not has_identifier (member)) { continue ; }
49+ if (not has_identifier (member)) {
50+ continue ;
51+ }
5252 names.push_back (identifier_of (member));
5353 }
54-
54+
5555 if (auto it = std::ranges::find (names, name); it != names.end ()) {
5656 return std::distance (names.begin (), it);
5757 }
5858 return -1UZ;
5959 }
6060
61- static consteval bool has_member (std::string_view name) {
62- return get_index_of (name) != -1UZ;
63- }
61+ static consteval bool has_member (std::string_view name) { return get_index_of (name) != -1UZ; }
6462};
6563
6664template <auto ... Members>
0 commit comments