Espaços nominais
Variantes
Acções

std::bitset::operator&=,|=,^=,~

Da cppreference.com
< cpp‎ | utility‎ | bitset

 
 
Biblioteca de utilitários
Digite apoio (basic types, RTTI, type traits)
Gerenciamento de memória dinâmica
De tratamento de erros
Utilidades do programa
Variadic funções
Data e hora
Objetos de função
initializer_list(C++11)
bitset
hash(C++11)
Os operadores relacionais
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Pares e tuplas
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
Troque, avançar e avançar
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
std::bitset
Tipos de membro
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::reference
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::bitset
bitset::operator==
bitset::operator!=
acesso. Elemento
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::operator[]
bitset::test
bitset::all
bitset::any
bitset::none
(C++11)

 
bitset::count
Capacidade
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::size
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::operator&=
bitset::operator|=
bitset::operator^=
bitset::operator~
bitset::operator<<=
bitset::operator>>=
bitset::operator<<
bitset::operator>>
bitset::set
bitset::reset
bitset::flip
Conversões
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::to_string
bitset::to_ulong
bitset::to_ullong(C++11)
Não-membros funções
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator&
operator|
operator^
operator<<
operator>>
Classes auxiliares
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::hash(C++11)
 
bitset<N>& operator&=( const bitset<N>& other );
(1)
bitset<N>& operator|=( const bitset<N>& other );
(2)
bitset<N>& operator^=( const bitset<N>& other );
(3)
bitset<N> operator~() const;
(4)
Executa binário AND, OR, XOR e NOT.
Original:
Performs binary AND, OR, XOR and NOT.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Define os bits para o resultado do binário e em pares correspondentes de bits de *this e other.
Original:
Sets the bits to the result of binary AND on corresponding pairs of bits of *this and other.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Define os bits para o resultado do binário ou em pares correspondentes de bits de *this e other.
Original:
Sets the bits to the result of binary OR on corresponding pairs of bits of *this and other.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Define os bits para o resultado do XOR binário em correspondentes pares de bits de *this e other.
Original:
Sets the bits to the result of binary XOR on corresponding pairs of bits of *this and other.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Retorna uma cópia temporária de *this com todos os bits invertida (binário NOT).
Original:
Returns a temporary copy of *this with all bits flipped (binary NOT).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
{{{1}}}
Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Parâmetros

other -
outro bitset
Original:
another bitset
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

1-3) *this

4)
um <N> bitset temporária com todos os bits capotou
Original:
a bitset<N> temporary with all bits flipped
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

#include <iostream>
#include <string>
#include <bitset>
 
int main()
{
    std::bitset<16> dest;
    std::string pattern_str = "1001";
    std::bitset<16> pattern(pattern_str);
 
    for (size_t i = 0, ie = dest.size()/pattern_str.size(); i != ie; ++i) {
        dest <<= pattern_str.size();
        dest |= pattern;
    }
    std::cout << dest << '\n';
}

Output:

1001100110011001

[editar] Veja também

realiza esquerda binário mudança e deslocamento para a direita
Original:
performs binary shift left and shift right
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]