Spec-Zone.ru › C++

Ключевое слово C++: and_eq

Использование

  • альтернативные операторы: в качестве альтернативы для &=

Пример

#include <bitset>
#include <iostream>

int main()
{
    std::bitset<4> mask("1100");
    std::bitset<4> val("0111");
    val and_eq mask;
    std::cout << val << '\n';
}

Вывод:

0100

См. также

  • and
  • bitand, bitor
  • not, not_eq
  • or, or_eq
  • xor, xor_eq

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/keyword/and_eq

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API