bool test(size_t pos, bool val = true);
The member function throws out_of_range if size() <= pos. Otherwise, it returns true only if the bit at position pos is set.
out_of_range
size
() <= pos
pos