From ef0b74e7b95796c2d01881b41880d1d31a237a51 Mon Sep 17 00:00:00 2001 From: Edward Nolan Date: Mon, 27 Apr 2026 18:24:28 -0400 Subject: [PATCH] Fix clang-format 785cd9894b3fe8d01b9c2bcdf33fc621e758cf4e updated the clang-format version and configuration but did not re-run clang-format, breaking the CI check on master. This commit addresses the issue by checking in the results of a clang-format run. --- include/beman/any_view/detail/compressed_ptr.hpp | 2 +- include/beman/any_view/detail/no_unique_address.hpp | 12 ++++++------ .../detail/reference_converts_from_temporary.hpp | 6 +++--- tests/beman/any_view/sfinae.test.cpp | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/beman/any_view/detail/compressed_ptr.hpp b/include/beman/any_view/detail/compressed_ptr.hpp index 415e17f..de3b046 100644 --- a/include/beman/any_view/detail/compressed_ptr.hpp +++ b/include/beman/any_view/detail/compressed_ptr.hpp @@ -33,7 +33,7 @@ class compressed_ptr { #if _MSC_VER template requires std::derived_from - [[nodiscard]] constexpr const MemberT& operator->*(MemberT BaseT::*member_ptr) const noexcept { + [[nodiscard]] constexpr const MemberT& operator->*(MemberT BaseT::* member_ptr) const noexcept { return value->*member_ptr; } #endif // _MSC_VER diff --git a/include/beman/any_view/detail/no_unique_address.hpp b/include/beman/any_view/detail/no_unique_address.hpp index a0038c5..773a738 100644 --- a/include/beman/any_view/detail/no_unique_address.hpp +++ b/include/beman/any_view/detail/no_unique_address.hpp @@ -4,11 +4,11 @@ #define BEMAN_ANY_VIEW_DETAIL_NO_UNIQUE_ADDRESS_HPP #ifndef BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS -#if _MSC_VER -#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] -#else -#define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[no_unique_address]] -#endif // _MSC_VER -#endif // BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS + #if _MSC_VER + #define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] + #else + #define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS [[no_unique_address]] + #endif // _MSC_VER +#endif // BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS #endif // BEMAN_ANY_VIEW_DETAIL_NO_UNIQUE_ADDRESS_HPP diff --git a/include/beman/any_view/detail/reference_converts_from_temporary.hpp b/include/beman/any_view/detail/reference_converts_from_temporary.hpp index 2899c41..7beab7b 100644 --- a/include/beman/any_view/detail/reference_converts_from_temporary.hpp +++ b/include/beman/any_view/detail/reference_converts_from_temporary.hpp @@ -9,14 +9,14 @@ template inline constexpr bool reference_converts_from_temporary_v = false; #ifdef __has_builtin -#if __has_builtin(__reference_converts_from_temporary) + #if __has_builtin(__reference_converts_from_temporary) template requires true inline constexpr bool reference_converts_from_temporary_v = __reference_converts_from_temporary(T, U); -#endif // __has_builtin(__reference_converts_from_temporary) -#endif // __has_builtin + #endif // __has_builtin(__reference_converts_from_temporary) +#endif // __has_builtin } // namespace beman::any_view::detail diff --git a/tests/beman/any_view/sfinae.test.cpp b/tests/beman/any_view/sfinae.test.cpp index ce17036..55e221d 100644 --- a/tests/beman/any_view/sfinae.test.cpp +++ b/tests/beman/any_view/sfinae.test.cpp @@ -93,11 +93,11 @@ TEST(SfinaeTest, span) { TEST(SfinaeTest, iota) { #ifdef __has_builtin -#if __has_builtin(__reference_converts_from_temporary) + #if __has_builtin(__reference_converts_from_temporary) // Prevention of dangling references requires C++23 compiler support static_assert(not std::constructible_from, std::ranges::iota_view>); -#endif // __has_builtin(__reference_converts_from_temporary) -#endif // __has_builtin + #endif // __has_builtin(__reference_converts_from_temporary) +#endif // __has_builtin static_assert(std::constructible_from, std::ranges::iota_view>); static_assert( not std::constructible_from, std::ranges::iota_view>);