1 // { dg-options "-std=gnu++0x" }
3 // 2010-06-09 Paolo Carlini <paolo.carlini@oracle.com>
5 // Copyright (C) 2010, 2011 Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING3. If not see
20 // <http://www.gnu.org/licenses/>.
22 #include <type_traits>
23 #include <testsuite_hooks.h>
24 #include <testsuite_tr1.h>
28 bool test __attribute__((unused)) = true;
29 using std::is_nothrow_constructible;
30 using namespace __gnu_test;
33 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
35 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
37 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
38 double&, int&, double&>(true)) );
39 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
41 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
43 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
44 double&, int&, double&>(true)) );
46 VERIFY( (test_property<is_nothrow_constructible, int[1]>(true)) );
49 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
51 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass>
53 VERIFY( (test_property<is_nothrow_constructible, NoexceptExplicitClass,
54 int, double>(false)) );
55 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
57 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass>
59 VERIFY( (test_property<is_nothrow_constructible, NothrowExplicitClass,
60 int, double>(false)) );
62 VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
64 VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
66 VERIFY( (test_property<is_nothrow_constructible, ExceptExplicitClass,
67 double&, int&, double&>(false)) );
68 VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
70 VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
72 VERIFY( (test_property<is_nothrow_constructible, ThrowExplicitClass,
73 double&, int&, double&>(false)) );
75 VERIFY( (test_property<is_nothrow_constructible, int[]>(false)) );