From 009259da8a71daff186522c31f25756ab41003ce Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 8 Dec 2016 09:57:00 +0000 Subject: [PATCH] Avoid C++17 guaranteed copy elision when testing for non-copyability llvm-svn: 289033 --- .../stream.buffers/streambuf/streambuf.cons/copy.fail.cpp | 4 ++-- .../thread/futures/futures.task/futures.task.members/ctor1.fail.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp index 469c744..03f6d7d 100644 --- a/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp +++ b/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.cons/copy.fail.cpp @@ -17,9 +17,9 @@ #include #include -std::streambuf get(); +std::streambuf &get(); int main() { - std::streambuf sb = get(); + std::streambuf sb = get(); // expected-error {{calling a protected constructor}} } diff --git a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp index 6d7d734..8882fd1 100644 --- a/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp +++ b/libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp @@ -28,6 +28,7 @@ typedef volatile std::packaged_task VPT; int main() { - PT p { VPT{} }; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task')}} + VPT init{}; + PT p{init}; // expected-error {{no matching constructor for initialization of 'PT' (aka 'packaged_task')}} // expected-note@future:* 1 {{candidate template ignored: disabled by 'enable_if'}} } -- 2.7.4