Repository navigation
LWG3476: thread and jthread constructors require that the parameters be move-constructible but never move construct the parameters #104307
Copy link
Copy link
Closed
Labels
c++23libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.lwg-issueCanonical version of a Library Working Group issue.Canonical version of a Library Working Group issue.
Description
Activity
- addedlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.lwg-issueCanonical version of a Library Working Group issue.Canonical version of a Library Working Group issue.
on Aug 14, 2024 Hey @ldionne, I wanna have a go at this. Looks like jthread already has the correct mandates, but thread and async are missing all of them so need to add them there.
Thanks @mleleszi!
I have some thoughts:
- For all of
async,jthread, andthread, we should add test cases. - For
thread, I think these Mandates are already implicitly imposed by usingtuple. - For
async, I believe we need to refactor internal functions to perfect-forward arguments wherever needed.
Such a class can be used. In tests, we can use a cv-unqualified
test_classlvalue as an argument.struct test_class { test_class() = default; test_class(test_class&) = default; test_class(const test_class&) = delete; };
- For all of
- marked [libc++] Possibly redundant auto-cast in
async#143828 as a duplicate of this issueon Dec 22, 2025 Thanks for the pointers!
For
thread, would it still be worth adding the mandates explicitly? Or you usually don't do that if they're implicitly imposed.I think additional explicit
static_assertwould be a bit useful, as the error messages fromtupleconstructors are usually messy.Reacted by Marcell Leleszi- added a commit that references this issue
on Dec 25, 2025 - moved this from Todo to Done in libc++ Standards Conformance
on Dec 25, 2025 - added a commit that references this issue
on Dec 25, 2025 - added a commit that references this issue
on Jan 6, 2026 - added a commit that references this issue
on Jun 14, 2026
Metadata
Metadata
Assignees
Labels
c++23libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.lwg-issueCanonical version of a Library Working Group issue.Canonical version of a Library Working Group issue.
Type
Projects
- StatusShow more project fieldsDone
Link: https://wg21.link/LWG3476