Espaços nominais
Variantes
Acções

operator&,|,^(std::bitset)

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
(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.
(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.
(C++11)
(C++11)
(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^
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.
(C++11)
 
bitset<N> operator&(const bitset<N>& lhs, const bitset<N>& rhs );
(1)
bitset<N> operator|(const bitset<N>& lhs, const bitset<N>& rhs );
(2)
bitset<N> operator^(const bitset<N>& lhs, const bitset<N>& rhs );
(3)
Executa binário AND, OR e XOR entre dois bitsets, lhs e rhs.
Original:
Performs binary AND, OR, and XOR between two bitsets, lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Retorna uma bitset<N> contendo o resultado de binário e em pares correspondentes de bits de lhs e rhs.
Original:
Returns a bitset<N> containing the result of binary AND on corresponding pairs of bits of lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Retorna uma bitset<N> contendo o resultado de binário OR em pares correspondentes de bits de lhs e rhs.
Original:
Returns a bitset<N> containing the result of binary OR on corresponding pairs of bits of lhs and rhs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Retorna uma bitset<N> contendo o resultado da XOR binário em pares correspondentes de bits de lhs e rhs.
Original:
Returns a bitset<N> containing the result of binary XOR on corresponding pairs of bits of lhs and rhs.
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

lhs -
o bitset no lado da mão esquerda do operador
Original:
the bitset on the left-hand side of the operator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rhs -
o bitset no lado da mão direita do operador
Original:
the bitset on the right-hand side of the operator
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)
{{{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.
2)
{{{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.
3)
{{{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.

[editar]Exceções

noexcept specification:  
noexcept
  (desde C++11)

[editar]Exemplo

#include <bitset>#include <iostream>   int main(){std::bitset<4> b1("0110");std::bitset<4> b2("0011");std::cout<<"b1 & b2: "<<(b1 & b2)<<'\n';std::cout<<"b1 | b2: "<<(b1 | b2)<<'\n';std::cout<<"b1 ^ b2: "<<(b1 ^ b2)<<'\n';}

Saída:

b1 & b2: 0010 b1 | b2: 0111 b1 ^ b2: 0101

[editar]Veja também

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.

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