set_all.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// test bitset<N>& set(); 11 12#include <bitset> 13#include <cassert> 14 15template <std::size_t N> 16void test_set_all() 17{ 18 std::bitset<N> v; 19 v.set(); 20 for (std::size_t i = 0; i < N; ++i) 21 assert(v[i]); 22} 23 24int main() 25{ 26 test_set_all<0>(); 27 test_set_all<1>(); 28 test_set_all<31>(); 29 test_set_all<32>(); 30 test_set_all<33>(); 31 test_set_all<63>(); 32 test_set_all<64>(); 33 test_set_all<65>(); 34 test_set_all<1000>(); 35} 36