From efbfd65c81dc856878e4ab3bc41ab9448acb679c Mon Sep 17 00:00:00 2001 From: cc <55869557+TomCC7@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:48:34 -0500 Subject: [PATCH] fix typo in variants_and_tagged_unions.md (#259) --- docs/variants_and_tagged_unions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/variants_and_tagged_unions.md b/docs/variants_and_tagged_unions.md index 4c327d77..a55c3ef3 100644 --- a/docs/variants_and_tagged_unions.md +++ b/docs/variants_and_tagged_unions.md @@ -230,7 +230,7 @@ const Shapes my_shape = rfl::make_field<"rectangle">(Rectangle{.height = 10, .width = 5}); const auto handle_shapes = [](const auto& field) { - using Name = typename std::decay_t(decltype(field))::Name; + using Name = typename std::decay_t::Name; if constexpr (std::is_same>()) { std::cout << is circle, radius: << field.value().radius() << std::endl; } else if constexpr (std::is_same>()) { @@ -259,7 +259,7 @@ using Shapes = rfl::TaggedUnion<"shape", Circle, Square, Rectangle>; const Shapes my_shape = Rectangle{.height = 10, .width = 5}; const auto handle_shapes = [](const auto& s) { - using Type = std::decay_t(decltype(s)); + using Type = std::decay_t; if constexpr (std::is_same()) { std::cout << is circle, radius: << s.radius() << std::endl; } else if constexpr (std::is_same()) {