1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 // expected-no-diagnostics
7 foo(const foo
&) = default;
9 void find_or_insert(const foo
& __obj
) {
14 bar(const bar
&) = default;
16 void test_bar(const bar
&obj
) {
27 template<typename T
> T
&&declval() noexcept
;
31 NonPOD(const NonPOD
&) noexcept
;
32 NonPOD(NonPOD
&&) noexcept
;
36 NonPOD np
= may_throw
<NonPOD
>();
39 static_assert(noexcept(declval
<X
>()), "noexcept isn't working at all");
40 static_assert(noexcept(X(declval
<X
&>())), "copy constructor can't throw");
41 static_assert(noexcept(X(declval
<X
>())), "move constructor can't throw");