What is the C ++ -> operator. (arrow point operator) found in acceleration documentation?

I read additional documentation and see the following at http://www.boost.org/doc/libs/1_54_0/doc/html/lambda/le_in_details.html :

Operators that cannot be overloaded

Some operators cannot be overloaded at all (::,.,. *). For some operators, the requirements for return types do not allow them to be overloaded to create lambda functors. These operators are →. , →, new, new [], delete, delete [] and ?: (conditional operator).

So what is the operator ->. ? I tried Google and http://www.symbolhound.com/ , but got nothing, a search on N3337 gives 1 result, which -> at the end of the sentence, and Visual Studio 2012 will not compile:

 class xT { bool operator ->. () {} /* fail */ }; std::string* p; p->.size(); /* fail */ std::auto_ptr<std::string> a; a->.size(); /* fail */ 

I believe that the author intentionally wrote ->. , since -> and . also included, but what is ->. or why is he here?

+7
c ++ boost operator-keyword
source share
3 answers

It seems to be a typo.

In project 3690 C ++, there is no mention of the operator ->. .

It could be ->* :

5.5 Operators with a pointer to the operator [expr.mptr.oper]

The element pointer operators ->* and .* Are grouped from left to right.

And at http://www.boost.org/doc/libs/1_54_0/doc/html/lambda/le_in_details.html they have an example with this statement.

+7
source share

As can be seen from C ++ 11, 2.13: “Operators and punctuators” there is no such operator as “ ->. ”.

+3
source share
0
source share

All Articles