size.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 size_t count() const;
11
12#include <bitset>
13#include <cassert>
14
15template <std::size_t N>
16void test_size()
17{
18    const std::bitset<N> v;
19    assert(v.size() == N);
20}
21
22
23int main()
24{
25    test_size<0>();
26    test_size<1>();
27    test_size<31>();
28    test_size<32>();
29    test_size<33>();
30    test_size<63>();
31    test_size<64>();
32    test_size<65>();
33    test_size<1000>();
34}
35