1 // (C) Copyright Jeremy Siek 2001. 2 // Distributed under the Boost Software License, Version 1.0. (See 3 // accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 // 6 // Sample output: 7 // 8 // bits(0) = 00 9 // bits(1) = 01 10 // bits(2) = 10 11 // bits(3) = 11 12 13 14 #include <iostream> 15 #include <boost/dynamic_bitset.hpp> 16 main()17int main() 18 { 19 const boost::dynamic_bitset<> b0(2, 0ul); 20 std::cout << "bits(0) = " << b0 << std::endl; 21 22 const boost::dynamic_bitset<> b1(2, 1ul); 23 std::cout << "bits(1) = " << b1 << std::endl; 24 25 const boost::dynamic_bitset<> b2(2, 2ul); 26 std::cout << "bits(2) = " << b2 << std::endl; 27 28 const boost::dynamic_bitset<> b3(2, 3ul); 29 std::cout << "bits(3) = " << b3 << std::endl; 30 31 return 0; 32 } 33