Sets val as the value for the bit at position pos.
Parameters
pos
Order position of the bit whose value is modified.
Order positions are counted from the rightmost bit, which is order position 0.
If pos is equal or greater than the bitset size, an out_of_range exception is thrown. size_t is an unsigned integral type.
val
Value to store in the bit (either true for one or false for zero).
For (1): it never throws exceptions (no-throw guarantee).
For (2): in case of exception, the object is in a valid state (basic guarantee).
If pos is equal or greater than the bitset size, the function throws an out_of_range exception.