Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/vector bool/flip"

From cppreference.com
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}}
{{ddcl | header=vector |
+
{{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}}
  
[[de:cpp/container/vector bool/flip]]
+
{{langlinks|de|es|fr|it|ja|pt|ru|zh}}
[[es:cpp/container/vector bool/flip]]
+
[[fr:cpp/container/vector bool/flip]]
+
[[it:cpp/container/vector bool/flip]]
+
[[ja:cpp/container/vector bool/flip]]
+
[[pt:cpp/container/vector bool/flip]]
+
[[ru:cpp/container/vector bool/flip]]
+
[[zh:cpp/container/vector bool/flip]]
+

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>) [edit]
toggles the values of bits
(public member function of std::bitset<N>) [edit]