mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-19 04:12:09 +00:00
This commit: - Sorts the #include directives: The #includes of the ""-form come first, those of the <>-form come later (this helps checking if any include file is not self-sufficient); in each of the two groups, the names of the headers or source files are sorted alphabetically (this eases searching for a specific #include and avoids duplicates). - Uses the ""-form when including Boost files; using the <>-form is a relic of the past. This was even discussed on the developers list many years ago and led to core issue 370. Note that some parts of DynamicBitset were already using the ""-form and that has never caused any problem, AFAIK. - Removes some comments attached to the directives themselves which seemed pretty useless and prone to get out of sync.
32 lines
741 B
C++
32 lines
741 B
C++
// (C) Copyright Jeremy Siek 2001.
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
//
|
|
// Sample output:
|
|
//
|
|
// bits(0) = 00
|
|
// bits(1) = 01
|
|
// bits(2) = 10
|
|
// bits(3) = 11
|
|
|
|
#include "boost/dynamic_bitset.hpp"
|
|
#include <iostream>
|
|
|
|
int main()
|
|
{
|
|
const boost::dynamic_bitset<> b0(2, 0ul);
|
|
std::cout << "bits(0) = " << b0 << std::endl;
|
|
|
|
const boost::dynamic_bitset<> b1(2, 1ul);
|
|
std::cout << "bits(1) = " << b1 << std::endl;
|
|
|
|
const boost::dynamic_bitset<> b2(2, 2ul);
|
|
std::cout << "bits(2) = " << b2 << std::endl;
|
|
|
|
const boost::dynamic_bitset<> b3(2, 3ul);
|
|
std::cout << "bits(3) = " << b3 << std::endl;
|
|
|
|
return 0;
|
|
}
|