std::bitset - cppreference.com
与std::vector<bool>
的关系类似于std::array<T, N>
与std::vector<T>
的关系,也就是同种元素的定长/非定长容器
- 可以由字符串或整形构造得到
- operator[]访问特定位
- 各种位操作的语法糖支持
- to_string等转换函数
- 大部分成员函数支持
constexpr
,提供很大便利
请随意转载
std::bitset - cppreference.com
与std::vector<bool>
的关系类似于std::array<T, N>
与std::vector<T>
的关系,也就是同种元素的定长/非定长容器
constexpr
,提供很大便利