std::bitset<N>::to_ulong (3) - Linux Manuals
std::bitset<N>::to_ulong: std::bitset<N>::to_ulong
NAME
std::bitset<N>::to_ulong - std::bitset<N>::to_ulong
Synopsis
unsigned long to_ulong() const
Converts the contents of the bitset to an unsigned long integer.
The first bit of the bitset corresponds to the least significant digit of the number and the last bit corresponds to the most significant digit.
Parameters
(none)
Return value
the converted integer
Exceptions
throws std::overflow_error if the value can not be represented in unsigned long.
Example
// Run this code
Output:
See also
to_string (public member function)
to_ullong returns an unsigned long long integer representation of the data
(C++11)