1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // test default ctor 11 12 #include <bitset> 13 #include <cassert> 14 15 #pragma clang diagnostic ignored "-Wtautological-compare" 16 17 template <std::size_t N> test_default_ctor()18void test_default_ctor() 19 { 20 { 21 _LIBCPP_CONSTEXPR std::bitset<N> v1; 22 assert(v1.size() == N); 23 for (std::size_t i = 0; i < N; ++i) 24 assert(v1[i] == false); 25 } 26 } 27 main()28int main() 29 { 30 test_default_ctor<0>(); 31 test_default_ctor<1>(); 32 test_default_ctor<31>(); 33 test_default_ctor<32>(); 34 test_default_ctor<33>(); 35 test_default_ctor<63>(); 36 test_default_ctor<64>(); 37 test_default_ctor<65>(); 38 test_default_ctor<1000>(); 39 } 40