gcc/libstdc++-v3
Jonathan Wakely ebc464940d libstdc++: Fix std::jthread bugs
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
2019-11-18 12:46:08 +00:00
..
config baseline_symbols.txt: Update. 2019-10-26 20:12:20 +00:00
doc libstdc++: Fix definition of std::nostopstate object 2019-11-15 14:38:59 +00:00
include libstdc++: Fix std::jthread bugs 2019-11-18 12:46:08 +00:00
libsupc++ libsupc++: Implement comparison algorithms for C++20 2019-11-13 16:26:18 +00:00
po PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
python Fix Xmethod for shared_ptr::use_count() 2019-09-11 12:38:23 +01:00
scripts Implement <concepts> header for C++20 2019-10-11 16:53:52 +01:00
src libstdc++: Implement LWG 3070 in path::lexically_relative 2019-11-15 19:58:15 +00:00
testsuite libstdc++: Fix std::jthread bugs 2019-11-18 12:46:08 +00:00
acinclude.m4 [ARM/FDPIC v6 24/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in libstdc++ configure scripts 2019-09-10 10:13:20 +02:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ChangeLog libstdc++: Fix std::jthread bugs 2019-11-18 12:46:08 +00:00
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 Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
ChangeLog-2018 Update copyright years. 2019-01-01 13:31:55 +01:00
config.h.in Build filesystem library with large file support 2019-10-04 16:08:23 +01:00
configure Build filesystem library with large file support 2019-10-04 16:08:23 +01:00
configure.ac Build filesystem library with large file support 2019-10-04 16:08:23 +01:00
configure.host [ARM/FDPIC v6 24/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in libstdc++ configure scripts 2019-09-10 10:13:20 +02:00
crossconfig.m4 Remove Cell Broadband Engine SPU targets 2019-09-03 15:08:28 +00:00
fragment.am PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
linkage.m4
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00
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.