ebc464940d
The std::jthread::get_id() function was missing a return statement. The is_invocable check needs to be done using decayed types, as they'll be forwarded to std::invoke as rvalues. Also reduce header dependencies for the <thread> header. We don't need to include <functional> for std::jthread because <bits/invoke.h> is already included, which defines std::__invoke. We can also remove <bits/functexcept.h> which isn't used at all. Finally, when _GLIBCXX_HAS_GTHREADS is not defined there's no point including any other headers, since we're not going to define anything in <thread> anyway. * include/std/thread: Reduce header dependencies. (jthread::get_id()): Add missing return. (jthread::get_stop_token()): Avoid unnecessary stop_source temporary. (jthread::_S_create): Check is_invocable using decayed types. Add static assertion. * testsuite/30_threads/jthread/1.cc: Add dg-require-gthreads. * testsuite/30_threads/jthread/2.cc: Likewise. * testsuite/30_threads/jthread/3.cc: New test. * testsuite/30_threads/jthread/jthread.cc: Add missing directives for pthread and gthread support. Use VERIFY instead of assert. From-SVN: r278402 |
||
---|---|---|
.. | ||
config | ||
doc | ||
include | ||
libsupc++ | ||
po | ||
python | ||
scripts | ||
src | ||
testsuite | ||
acinclude.m4 | ||
aclocal.m4 | ||
ChangeLog | ||
ChangeLog-1998 | ||
ChangeLog-1999 | ||
ChangeLog-2000 | ||
ChangeLog-2001 | ||
ChangeLog-2002 | ||
ChangeLog-2003 | ||
ChangeLog-2004 | ||
ChangeLog-2005 | ||
ChangeLog-2006 | ||
ChangeLog-2007 | ||
ChangeLog-2008 | ||
ChangeLog-2009 | ||
ChangeLog-2010 | ||
ChangeLog-2011 | ||
ChangeLog-2012 | ||
ChangeLog-2013 | ||
ChangeLog-2014 | ||
ChangeLog-2015 | ||
ChangeLog-2016 | ||
ChangeLog-2017 | ||
ChangeLog-2018 | ||
config.h.in | ||
configure | ||
configure.ac | ||
configure.host | ||
crossconfig.m4 | ||
fragment.am | ||
linkage.m4 | ||
Makefile.am | ||
Makefile.in | ||
README |
file: libstdc++-v3/README New users may wish to point their web browsers to the file index.html in the 'doc/html' subdirectory. It contains brief building instructions and notes on how to configure the library in interesting ways.