From: Jason Merrill Date: Fri, 6 Aug 2010 19:41:23 +0000 (-0400) Subject: * include/std/thread: Add deleted thread(thread&). X-Git-Tag: releases/gcc-4.6.0~5197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2edc921474d996f69cfd1c937afea8ef339987e;p=thirdparty%2Fgcc.git * include/std/thread: Add deleted thread(thread&). From-SVN: r162954 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9690a7ed9033..ccdf13a939cd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2010-08-06 Jason Merrill + + * include/std/thread: Add deleted thread(thread&). + * testsuite/30_threads/thread/cons/copy_neg.cc: Remove XFAIL. + 2010-08-06 Paolo Carlini * include/std/tuple (pack_arguments): Rename to forward_as_tuple diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread index c348c76bc40e..8007edc15e7f 100644 --- a/libstdc++-v3/include/std/thread +++ b/libstdc++-v3/include/std/thread @@ -123,6 +123,7 @@ namespace std public: thread() = default; + thread(thread&) = delete; thread(const thread&) = delete; thread(thread&& __t) diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc index db06e72b0f36..9d8681d471f0 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc @@ -27,13 +27,7 @@ void test01() // copy typedef std::thread test_type; test_type t1; - test_type t2(t1); // { dg-error "deleted" "" { xfail *-*-* } } + test_type t2(t1); // { dg-error "deleted" } } -// This is failing for the wrong reason; it should fail because we're -// trying to call the deleted copy constructor, but instead it fails -// because we try to call the thread(_Callable&&,_Args&&...) constructor -// and fail because thread isn't callable. But that's OK for now. -// { dg-error "" "" { target *-*-* } 30 } - // { dg-prune-output "include" }