[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / language.support / support.dynamic / nothrow_t.fail.cpp
blobe37b7ad008f7c21524e592ba5ebc54fe32e7c8fd
1 //===----------------------------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: c++03
12 // Before GCC 6, aggregate initialization kicks in.
13 // See https://stackoverflow.com/q/41799015/627587.
14 // UNSUPPORTED: gcc-5
16 // struct nothrow_t {
17 // explicit nothrow_t() = default;
18 // };
19 // extern const nothrow_t nothrow;
21 // This test checks for LWG 2510.
23 #include <new>
26 std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}}
28 int main(int, char**) {
29 return 0;