Spec-Zone.ru › C++

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

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

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

Пример

int main()
{
    static_assert((false and false) == false);
    static_assert((false and true)  == false);
    static_assert((true  and false) == false);
    static_assert((true  and true)  == true);
}

См. также

  • and_eq
  • 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

Spec-Zone.ru

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