[libcxx-commits] [libcxx] [libc++][numeric] Modernized `std::midpoint` (PR #174596)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 7 00:03:17 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libcxx/include/__numeric/midpoint.h libcxx/test/libcxx/numerics/nodiscard.verify.cpp libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.verify.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.verify.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.verify.cpp
index 379bb27d6..3dbb5d590 100644
--- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.verify.cpp
+++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.verify.cpp
@@ -29,7 +29,8 @@ void* vp = nullptr;
void test() {
(void)std::midpoint(false, true); // expected-error {{no matching function for call to 'midpoint'}}
(void)std::midpoint<const bool>(false, true); // expected-error {{no matching function for call to 'midpoint'}}
- (void)std::midpoint<const volatile bool>(false, true); // expected-error {{no matching function for call to 'midpoint'}}
+ (void)std::midpoint<const volatile bool>(
+ false, true); // expected-error {{no matching function for call to 'midpoint'}}
(void)std::midpoint<volatile bool>(false, true); // expected-error {{no matching function for call to 'midpoint'}}
// A couple of odd pointer types that should fail
``````````
</details>
https://github.com/llvm/llvm-project/pull/174596
More information about the libcxx-commits
mailing list