Standard C++ Library Class Reference

Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
bitset
Container
Summary
A template class and related functions for storing and manipulating fixed-size sequences of bits.
Contents
Synopsis
Description
Errors and exceptions
Interface
Constructors
Assignment Operator
Operators
Member Functions
See Also
Synopsis
#include <bitset>
template <size_t N>
class bitset ;
Description
bitset<size_t N> is a class that describes objects that can store a sequence consisting of a fixed number of bits, N. Each bit
represents either the value zero (reset) or one (set) and has a non-negative position pos.
Errors and exceptions
Bitset constructors and member functions may report the following three types of errors -- each associated with a distinct
exception:
invalid-argument error or invalid_argument() exception;
out-of-range error or out_of_range() exception;
overflow error or over-flow_error() exception;
If exceptions are not supported on your compiler, you will get an assertion failure instead of an exception.