mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-19 04:12:09 +00:00
27 lines
641 B
C++
27 lines
641 B
C++
//
|
|
// Copyright (C) 2018 James E. King III
|
|
//
|
|
// 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)
|
|
//
|
|
|
|
#include "boost/core/lightweight_test.hpp"
|
|
#include "boost/dynamic_bitset.hpp"
|
|
|
|
int
|
|
main( int, char *[] )
|
|
{
|
|
boost::dynamic_bitset<> x( 5 ); // all 0's by default
|
|
x.set( 1, 2 );
|
|
x.set( 3, 1, true );
|
|
x.set( 2, 1, false );
|
|
BOOST_TEST( ! x.test( 0 ) );
|
|
BOOST_TEST( x.test( 1 ) );
|
|
BOOST_TEST( ! x.test( 2 ) );
|
|
BOOST_TEST( x.test( 3 ) );
|
|
BOOST_TEST( ! x.test( 4 ) );
|
|
|
|
return boost::report_errors();
|
|
}
|