std::vector<bool>::reference
STD::向量<bool>*参考
class reference; | | |
---|
大std::vector<bool>专业化定义std::vector<bool>::reference作为一个可公开访问的嵌套类。std::vector<bool>::reference中对单个位的引用的行为。std::vector<bool>...
主要用途std::vector<bool>::reference提供一个可以从operator[]...
任何通过std::vector<bool>::reference潜在地读取或写入整个基础向量。
成员函数
(constructor) | constructs the reference. Accessible only to std::vector |
---|---|
(destructor) | destroys the reference (public member function) |
operator= | assigns a bool to the referenced bit (public member function) |
operator bool | returns the referenced bit (public member function) |
flip | flips the referenced bit (public member function) |
STD::向量<bool>*~参考
~reference() | | |
---|
摧毁了引用。
STD::向量<bool>*参考::操作员=
reference& operator=( bool x reference& operator=( const reference& x | | |
---|
为引用的位分配一个值。
参数
x | - | value to assign |
---|
返回值
*this
...
例外
(none) | (until C++11) |
---|---|
noexcept specification: noexcept | (since C++11) |
STD::向量<bool>*参考资料::操作人员bool
operator bool() const; | | |
---|
返回引用位的值。
参数
%280%29
返回值
参考位。
例外
(none) | (until C++11) |
---|---|
noexcept specification: noexcept | (since C++11) |
STD::向量<bool>*参考资料::翻转
void flip( | | |
---|
反转所引用的位。
参数
%280%29
返回值
%280%29
例外
(none) | (until C++11) |
---|---|
noexcept specification: noexcept | (since C++11) |
另见
operator[] | access specified element (public member function of std::vector) |
---|---|
swap static | swaps two std::vector<bool>::references (public static member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。