When did “and” become an operator in C++

后端 未结 7 1206
后悔当初
后悔当初 2020-12-05 18:00

I have some code that looks like:

static const std::string and(\" AND \");

This causes an error in g++ like so:

Row.cpp:140         


        
7条回答
  •  盖世英雄少女心
    2020-12-05 18:15

    They've been there since C++ 98. They're listed in the §2.5/2 of the standard (either the 1998 or the 2003 edition). The alternate tokens include: and, or, xor, not, bitand, bitor, compl, and_eq, or_eq, xor_eq, not, not_eq.

提交回复
热议问题