[libcxx-commits] [libcxx] [libc++] Implement LWG3476: Add mandates to thread, jthread, and async (PR #173363)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 23 03:54:58 PST 2025
================
@@ -116,6 +111,11 @@ class jthread {
private:
template <class _Fun, class... _Args>
_LIBCPP_HIDE_FROM_ABI static thread __init_thread(const stop_source& __ss, _Fun&& __fun, _Args&&... __args) {
+ static_assert(is_constructible_v<decay_t<_Fun>, _Fun>);
----------------
frederick-vs-ja wrote:
I think it's better to keep these `static_assert`'s in their original places, which should avoid including internal function names in error messages.
https://github.com/llvm/llvm-project/pull/173363
More information about the libcxx-commits
mailing list