is_nothrow_constructible.pass.cpp revision bc8d3f97eb5c958007f2713238472e0c1c8fe02c
1//===----------------------------------------------------------------------===//
2//
3// ��������������������The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// type_traits
11
12// template <class T, class... Args>
13//   struct is_nothrow_constructible;
14
15#include <type_traits>
16
17#ifndef _LIBCPP_HAS_NO_VARIADICS
18
19class Empty
20{
21};
22
23class NotEmpty
24{
25    virtual ~NotEmpty();
26};
27
28union Union {};
29
30struct bit_zero
31{
32    int :  0;
33};
34
35class Abstract
36{
37    virtual ~Abstract() = 0;
38};
39
40struct A
41{
42    A(const A&);
43};
44
45#endif
46
47int main()
48{
49#ifndef _LIBCPP_HAS_NO_VARIADICS
50    static_assert((std::is_nothrow_constructible<int, const int>::value), "");
51#endif
52}
53