Howard Hinnant | c52f43e | 2010-08-22 00:59:46 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 +0000 | [diff] [blame^] | 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
Howard Hinnant | c52f43e | 2010-08-22 00:59:46 +0000 | [diff] [blame] | 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 | |
| 19 | class Empty |
| 20 | { |
| 21 | }; |
| 22 | |
| 23 | class NotEmpty |
| 24 | { |
| 25 | virtual ~NotEmpty(); |
| 26 | }; |
| 27 | |
| 28 | union Union {}; |
| 29 | |
| 30 | struct bit_zero |
| 31 | { |
| 32 | int : 0; |
| 33 | }; |
| 34 | |
| 35 | class Abstract |
| 36 | { |
| 37 | virtual ~Abstract() = 0; |
| 38 | }; |
| 39 | |
| 40 | struct A |
| 41 | { |
| 42 | A(const A&); |
| 43 | }; |
| 44 | |
| 45 | #endif // _LIBCPP_HAS_NO_VARIADICS |
| 46 | |
| 47 | int main() |
| 48 | { |
| 49 | #ifndef _LIBCPP_HAS_NO_VARIADICS |
| 50 | static_assert((std::is_nothrow_constructible<int, const int>::value), ""); |
| 51 | #endif |
| 52 | } |