[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/utility/bitset/operator_logic [Back]  [Original]

std::bitset::operator&=,|=,^=,~ cppreference.com
cppreference.com
Espaces de noms
Variantes

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

De cppreference.com

<metanoindex/>

 
 
 
std::bitset
Types de membres
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
Les fonctions membres
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!=
Elment d'accs
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
Capacit
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
Modificateurs
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
Conversions
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)
Tiers fonctions
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 d'aide
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)
 
<tbody> </tbody>
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)
Effectue binaire AND, OR, XOR et 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)

Dfinit les bits la suite de binaires et sur les paires correspondantes de bits de *this et 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)

Dfinit les bits la suite de binaires ou sur des paires correspondantes de bits de *this et 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)

Positionne les bits la suite de XOR binaire sur des paires correspondantes de bits de *this et 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)

Retourne une copie temporaire de *this avec tous les bits retournes (binaire PAS) .
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.

Paramtres

other -
bitset autre
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.

Retourne la valeur

1-3) *this

4)

un <N> bitset temporaire avec tous les bits inverss
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.

Exemple

#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';
}

Rsultat :

1001100110011001

Voir aussi

effectue dcalage binaire gauche et dplacement vers la droite
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.

(fonction membre publique) [edit]

Web Proxy Viewer  |  New URL  |  Original Page