bitset::to_ullong
Returns an unsigned long long value that contains the same bits set as the contents of the bitset object.
unsigned long long to_ullong() const;
Property Value/Return Value
Returns the sum of the bit values that are in the bit sequence as an unsigned long long. This unsigned long long value would re-create the same set bits if it is used to initialize a bitset.
Exceptions
The method throws an overflow_error Class if any bit in the bit sequence has a bit value that cannot be represented as a value of type unsigned long long.
Remarks
Returns the sum of the bit values in the bit sequence as an unsigned long long.
Requirements
Header: <bitset>
Namespace: std