[libcxx-commits] [libcxx] [libc++][jthread] LWG3788: `jthread::operator=(jthread&&)` postconditions are unimplementable under self-assignment (PR #153758)

via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 15 00:35:56 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp b/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp
index 61a9c3935..fd5a1705c 100644
--- a/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp
+++ b/libcxx/test/std/thread/thread.jthread/assign.move.pass.cpp
@@ -115,8 +115,8 @@ int main(int, char**) {
   // LWG3788: self-assignement
   {
     std::jthread j = support::make_test_jthread([] {});
-    auto oldId = j.get_id();
-    j = std::move(j);
+    auto oldId     = j.get_id();
+    j              = std::move(j);
 
     assert(j.get_id() == oldId);
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/153758


More information about the libcxx-commits mailing list