Bit Logic > bit_container > none
none
Syntax:
   #include <boost/bit_logic/bit_container_type.hpp>
   bool none ( ) const ;
   bool none ( size_type upper_bit_idx, size_type lower_bit_idx ) ; 

Note: These functions are equivelant for all bit_container types. bit_array<N>, bit_vector, bit_container_adaptor

Test if all bits within the bit_container_type are 0's, or tests if bits within a range are 0's.

For example:

 bit_vector<> v (8);
 v = "01100010" ; 
 cout << "Entire container is : " << v.none() << endl ;
 cout << "none bits 4:2  : " << v.none(4,2) << endl ;
 cout << "none bits 5:2  : " << v.none(5,2) << endl ;

This code would produce this output:

 Entire container is : 0
 none bits 4 - 2 : 1
 none bits 5 - 2 : 0

No argument none cannot throw exception. Argument none can throw the following.

Exceptions:
std::logic_error Backwards ordering of range selection
bit_logic::bit_out_of_bounds Index exceeds boundaries of container