]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/testsuite/20_util/is_trivially_default_constructible/value.cc
Restore dg-interpreter-batch-mode for libstdc++ tests
[gcc.git] / libstdc++-v3 / testsuite / 20_util / is_trivially_default_constructible / value.cc
CommitLineData
f5e523b7
VV
1// { dg-options "-std=gnu++11" }
2// { dg-do compile }
3//
4// 2014-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
5//
818ab71a 6// Copyright (C) 2014-2016 Free Software Foundation, Inc.
f5e523b7
VV
7//
8// This file is part of the GNU ISO C++ Library. This library is free
9// software; you can redistribute it and/or modify it under the
10// terms of the GNU General Public License as published by the
11// Free Software Foundation; either version 3, or (at your option)
12// any later version.
13//
14// This library is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17// GNU General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License along
20// with this library; see the file COPYING3. If not see
21// <http://www.gnu.org/licenses/>.
22
23#include <type_traits>
24#include <testsuite_tr1.h>
25
26struct HasTemplateCtor
27{
28 HasTemplateCtor() = default;
29 template <class T>
30 HasTemplateCtor();
31};
32
33void test01()
34{
35 using std::is_trivially_default_constructible;
36 using namespace __gnu_test;
37
38 static_assert(test_category<is_trivially_default_constructible,
39 int>(true), "");
40 static_assert(test_category<is_trivially_default_constructible,
41 TType>(true), "");
42 static_assert(test_category<is_trivially_default_constructible,
43 PODType>(true), "");
44 static_assert(test_category<is_trivially_default_constructible,
45 NType>(false), "");
46 static_assert(test_category<is_trivially_default_constructible,
47 SLType>(false), "");
48 static_assert(test_category<is_trivially_default_constructible,
49 construct::DelDef>(false), "");
50 static_assert(test_category<is_trivially_default_constructible,
51 construct::Abstract>(false), "");
52 static_assert(test_category<is_trivially_default_constructible,
53 construct::Ellipsis>(false), "");
54 static_assert(test_category<is_trivially_default_constructible,
55 construct::DelEllipsis>(false), "");
56 static_assert(test_category<is_trivially_default_constructible,
57 construct::Any>(false), "");
58 static_assert(test_category<is_trivially_default_constructible,
59 construct::DelCopy>(false), "");
60 static_assert(test_category<is_trivially_default_constructible,
61 construct::DelDtor>(false), "");
62 static_assert(test_category<is_trivially_default_constructible,
63 construct::Nontrivial>(false), "");
64 static_assert(test_category<is_trivially_default_constructible,
65 HasTemplateCtor>(true), "");
66}
This page took 0.225451 seconds and 5 git commands to generate.