diff --git a/include/ylt/reflection/member_value.hpp b/include/ylt/reflection/member_value.hpp index 28b7f1d8b..3c3d4fc55 100644 --- a/include/ylt/reflection/member_value.hpp +++ b/include/ylt/reflection/member_value.hpp @@ -215,28 +215,35 @@ inline constexpr void for_each(T&& t, Visit&& func) { else { if constexpr (std::is_invocable_v) { visit_members(t, [&](auto&... args) { -#if __cplusplus >= 202002L && (!defined(_MSC_VER) || _MSC_VER >= 1930) +#if __cplusplus >= 202002L && (!defined(_MSC_VER) || _MSC_VER >= + 1930) [&](std::index_sequence) mutable { constexpr auto arr = get_member_names(); (func(args, arr[Is]), ...); } (std::make_index_sequence{}); #else - visit_members_impl0(std::forward(func), std::make_index_sequence{}, args...); + visit_members_impl0(std::forward(func), + std::make_index_sequence{}, + args...); + #endif }); } else if constexpr (std::is_invocable_v) { visit_members(t, [&](auto&... args) { -#if __cplusplus >= 202002L && (!defined(_MSC_VER) || _MSC_VER >= 1930) +#if __cplusplus >= 202002L && (!defined(_MSC_VER) || _MSC_VER >= + 1930) [&](std::index_sequence) mutable { constexpr auto arr = get_member_names(); (func(args, arr[Is], Is), ...); } (std::make_index_sequence{}); #else - visit_members_impl(std::forward(func), std::make_index_sequence{}, args...); + visit_members_impl(std::forward(func), + std::make_index_sequence{}, + args...); #endif }); }