- 论坛徽章:
- 0
|
~ $ clang++ l.cc -std=c++1z -pthread -stdlib=libc++
In file included from l.cc:2:
/usr/local/opt/clang/bin/../include/c++/v1/thread:337:5: error: attempt to use a deleted function
__invoke(_VSTD::move(_VSTD::get<0>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...);
^
/usr/local/opt/clang/bin/../include/c++/v1/thread:347:5: note: in instantiation of function template specialization 'std::__1::__thread_execute<(lambda at l.cc:9:11), test, 1>' requested here
__thread_execute(*__p, _Index());
^
/usr/local/opt/clang/bin/../include/c++/v1/thread:359:42: note: in instantiation of function template specialization 'std::__1::__thread_proxy<std::__1::tuple<(lambda at l.cc:9:11), test> >' requested
here
int __ec = pthread_create(&__t_, 0, &__thread_proxy<_Gp>, __p.get());
^
l.cc:12:23: note: in instantiation of function template specialization 'std::__1::thread::thread<(lambda at l.cc:9:11) &, test &, void>' requested here
std::thread *t = new std::thread(f, a);
^
/usr/local/opt/clang/bin/../include/c++/v1/type_traits:1069:5: note: '~__nat' has been explicitly marked deleted here
~__nat() = delete;
^
1 error generated.
|
|