Difference between revisions of "cpp/container/vector bool/flip"
From cppreference.com
< cpp | container | vector bool
m (Update links.) |
(P1004R2) |
||
Line 1: | Line 1: | ||
{{cpp/container/vector_bool/title | flip}} | {{cpp/container/vector_bool/title | flip}} | ||
{{cpp/container/vector_bool/navbar}} | {{cpp/container/vector_bool/navbar}} | ||
− | {{ | + | {{dcl begin}} |
+ | {{dcl header | vector}} | ||
+ | {{dcl rev multi | | ||
+ | | dcl1= | ||
void flip(); | void flip(); | ||
+ | | since2=c++20 | dcl2= | ||
+ | constexpr void flip(); | ||
}} | }} | ||
+ | {{dcl end}} | ||
Toggles each {{c|bool}} in the vector (replaces with its opposite value). | Toggles each {{c|bool}} in the vector (replaces with its opposite value). | ||
Line 19: | Line 25: | ||
{{dsc end}} | {{dsc end}} | ||
− | + | {{langlinks|de|es|fr|it|ja|pt|ru|zh}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Revision as of 09:28, 9 August 2020
Defined in header <vector>
|
||
void flip(); |
(until C++20) | |
constexpr void flip(); |
(since C++20) | |
Toggles each bool in the vector (replaces with its opposite value).
Parameters
(none)
Return value
(none)
See also
access specified element (public member function of std::vector<T,Allocator> )
| |
toggles the values of bits (public member function of std::bitset<N> )
|