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 //===----------------------------------------------------------------------===//
9
10 // UNSUPPORTED: c++03
11
12 // struct nothrow_t {
13 // explicit nothrow_t() = default;
14 // };
15 // extern const nothrow_t nothrow;
16
17 // This test checks for LWG 2510.
18
19 #include <new>
20
21
f()22 std::nothrow_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}}
23
main(int,char **)24 int main(int, char**) {
25 return 0;
26 }
27