From 451b2fe9d0a5a36146597b06b6510279b26a6b4c Mon Sep 17 00:00:00 2001 From: qicosmos Date: Mon, 26 Aug 2024 17:58:03 +0800 Subject: [PATCH] format --- iguana/define.h | 3 ++- iguana/ylt/reflection/member_value.hpp | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/iguana/define.h b/iguana/define.h index 2887122c..0c0b4485 100644 --- a/iguana/define.h +++ b/iguana/define.h @@ -21,7 +21,8 @@ #define IGUANA__INLINE_LAMBDA constexpr __attribute__((always_inline)) #endif -#if __has_cpp_attribute(likely) && __has_cpp_attribute(unlikely) +#if __has_cpp_attribute(likely) && __has_cpp_attribute(unlikely) && \ + __cplusplus >= 202002L #define IGUANA_LIKELY [[likely]] #define IGUANA_UNLIKELY [[unlikely]] #else diff --git a/iguana/ylt/reflection/member_value.hpp b/iguana/ylt/reflection/member_value.hpp index 06d677e1..b62f30c8 100644 --- a/iguana/ylt/reflection/member_value.hpp +++ b/iguana/ylt/reflection/member_value.hpp @@ -235,7 +235,9 @@ inline constexpr void for_each(T&& t, Visit&& func) { } (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 }); } @@ -249,7 +251,9 @@ inline constexpr void for_each(T&& t, Visit&& func) { } (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 }); }