mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-30 07:52:07 +00:00
Reformat all the C++ code (with ClangFormat)
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
|
||||
// An example of setting and reading some bits. Note that operator[]
|
||||
// goes from the least-significant bit at 0 to the most significant
|
||||
// bit at size()-1. The operator<< for dynamic_bitset prints the
|
||||
@@ -20,14 +18,15 @@
|
||||
#include "boost/dynamic_bitset.hpp"
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
int
|
||||
main()
|
||||
{
|
||||
boost::dynamic_bitset<> x(5); // all 0's by default
|
||||
x[0] = 1;
|
||||
x[1] = 1;
|
||||
x[4] = 1;
|
||||
for (boost::dynamic_bitset<>::size_type i = 0; i < x.size(); ++i)
|
||||
std::cout << x[i];
|
||||
boost::dynamic_bitset<> x( 5 ); // all 0's by default
|
||||
x[ 0 ] = 1;
|
||||
x[ 1 ] = 1;
|
||||
x[ 4 ] = 1;
|
||||
for ( boost::dynamic_bitset<>::size_type i = 0; i < x.size(); ++i )
|
||||
std::cout << x[ i ];
|
||||
std::cout << "\n";
|
||||
std::cout << x << "\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user