mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-29 22:36:19 +08:00
Fix make_tag to correctly handle reflection types (#391)
This commit is contained in:
@@ -16,7 +16,7 @@ namespace rfl::internal {
|
||||
template <internal::StringLiteral _discriminator, class T>
|
||||
static inline auto make_tag(const T& _t) noexcept {
|
||||
if constexpr (internal::has_reflection_type_v<T>) {
|
||||
return make_tag<typename T::ReflectionType>();
|
||||
return make_tag<_discriminator>(_t.reflection());
|
||||
} else if constexpr (named_tuple_t<T>::Names::template contains<
|
||||
_discriminator>()) {
|
||||
return *to_view(_t).template get<_discriminator>();
|
||||
|
||||
Reference in New Issue
Block a user