Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the @ operator?

In the C++ reference page here it has a table of operators, but I don't understand what the operator@ is. For example:

@a (a).operator@ ( ) operator@ (a) !std::cin calls std::cin.operator!()

However there's no such operator in the language. What does it mean?

like image 218
user4176466 Avatar asked Oct 24 '14 04:10

user4176466


People also ask

What is the operator example?

In mathematics and sometimes in computer programming, an operator is a character that represents an action, as for example x is an arithmetic operator that represents multiplication. In computer programs, one of the most familiar sets of operators, the Boolean operators, is used to work with true/false values.

What is called a operator?

What is Operator? Simple answer can be given using expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator.

What is the operator used for?

An operator is used to manipulate individual data items and return a result. These items are called operands or arguments.

What are the operators in computer?

There are three types of operator that programmers use: arithmetic operators. relational operators. logical operators.


2 Answers

@ is not a valid C++ operator and It is used here as a placeholder for actual operators.
In short, it can be replaced by any of the actual C++ operators and the statement should hold good for that particular operator.

like image 129
Alok Save Avatar answered Oct 07 '22 00:10

Alok Save


The cppreference page as well as the C++ standard treat the @ character as a placeholder for real operators. It is not used to code.

like image 43
Fabio A. Correa Avatar answered Oct 07 '22 01:10

Fabio A. Correa