1) Default constructor. Constructs a bitset with all bits set to zero.

2) Constructs a bitset, initializing the first (rightmost, least significant) M bit positions to the corresponding bit values of val, where M is the smaller of the number of bits in an unsigned long long and the number of bits N in the bitset being constructed. If M is less than N (the bitset is longer than 32(until C++11)64(since C++11) bits, for typical implementations of unsigned long (since C++11)long), the remaining bit positions are initialized to zeroes.

3) Constructs a bitset using the characters in the std::basic_stringstr. An optional starting position pos and length n can be provided, as well as characters denoting alternate values for set (one) and unset (zero) bits. Traits::eq() is used to compare the character values.

The effective length of the initializing string is min(n, str.size() - pos).