This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add deleted std::thread(const thread&&) constructor


LWG 2097 says that the templated std::thread(Callable&&, Args&&...)
constructor should not participate in overload resolution when
decay_t<Callable> is std::thread. Rather than removing it from the
overload set we just ensure that there are better matches, but we fail
to do so for const rvalues. This fixes it.

	PR libstdc++/78956
	* include/std/thread (thread(const thread&&)): Add deleted
	constructor.
	* testsuite/30_threads/thread/cons/lwg2097.cc: New test.

Tested powerpc64le-linux, committed to trunk.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]