Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Aug 26, 2024
1 parent 332d63a commit 451b2fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion iguana/define.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions iguana/ylt/reflection/member_value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ inline constexpr void for_each(T&& t, Visit&& func) {
}
(std::make_index_sequence<sizeof...(args)>{});
#else
visit_members_impl0<T>(std::forward<Visit>(func), std::make_index_sequence<sizeof...(args)>{}, args...);
visit_members_impl0<T>(std::forward<Visit>(func),
std::make_index_sequence<sizeof...(args)>{},
args...);
#endif
});
}
Expand All @@ -249,7 +251,9 @@ inline constexpr void for_each(T&& t, Visit&& func) {
}
(std::make_index_sequence<sizeof...(args)>{});
#else
visit_members_impl<T>(std::forward<Visit>(func), std::make_index_sequence<sizeof...(args)>{}, args...);
visit_members_impl<T>(std::forward<Visit>(func),
std::make_index_sequence<sizeof...(args)>{},
args...);
#endif
});
}
Expand Down

0 comments on commit 451b2fe

Please sign in to comment.