std::bitset::size - cppreference.com (original) (raw)
| | (noexcept since C++11) (constexpr since C++11) | | ------------------------------------------------- |
Returns the number of bits that the bitset holds.
[edit] Parameters
(none)
[edit] Return value
number of bits that the bitset holds, i.e. the template parameter N.
[edit] Example
#include #include int main() { std::cout << std::bitset<0x400>().size() << '\n'; }
Output:
[edit] See also
| | returns the number of bits set to true (public member function) [edit] | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |