| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // <bitset> |
| 10 | |
| 11 | #include <bitset> |
| 12 | #include <type_traits> |
| 13 | |
| 14 | #include "test_macros.h" |
| 15 | |
| 16 | static_assert(!std::is_default_constructible<std::bitset<0>::reference>::value, "" ); |
| 17 | static_assert(!std::is_default_constructible<std::bitset<1>::reference>::value, "" ); |
| 18 | static_assert(!std::is_default_constructible<std::bitset<8>::reference>::value, "" ); |
| 19 | static_assert(!std::is_default_constructible<std::bitset<12>::reference>::value, "" ); |
| 20 | static_assert(!std::is_default_constructible<std::bitset<16>::reference>::value, "" ); |
| 21 | static_assert(!std::is_default_constructible<std::bitset<24>::reference>::value, "" ); |
| 22 | static_assert(!std::is_default_constructible<std::bitset<32>::reference>::value, "" ); |
| 23 | static_assert(!std::is_default_constructible<std::bitset<48>::reference>::value, "" ); |
| 24 | static_assert(!std::is_default_constructible<std::bitset<64>::reference>::value, "" ); |
| 25 | static_assert(!std::is_default_constructible<std::bitset<96>::reference>::value, "" ); |
| 26 | |
| 27 | #if TEST_STD_VER >= 11 |
| 28 | void test_no_ambiguity_among_default_constructors(std::enable_if<false>); |
| 29 | void test_no_ambiguity_among_default_constructors(std::bitset<0>::reference); |
| 30 | void test_no_ambiguity_among_default_constructors(std::bitset<1>::reference); |
| 31 | void test_no_ambiguity_among_default_constructors(std::bitset<8>::reference); |
| 32 | void test_no_ambiguity_among_default_constructors(std::bitset<12>::reference); |
| 33 | void test_no_ambiguity_among_default_constructors(std::bitset<16>::reference); |
| 34 | void test_no_ambiguity_among_default_constructors(std::bitset<24>::reference); |
| 35 | void test_no_ambiguity_among_default_constructors(std::bitset<32>::reference); |
| 36 | void test_no_ambiguity_among_default_constructors(std::bitset<48>::reference); |
| 37 | void test_no_ambiguity_among_default_constructors(std::bitset<64>::reference); |
| 38 | void test_no_ambiguity_among_default_constructors(std::bitset<96>::reference); |
| 39 | |
| 40 | ASSERT_SAME_TYPE(decltype(test_no_ambiguity_among_default_constructors({})), void); |
| 41 | #endif |
| 42 | |