Recently, there ran a question about the sequence of operators ++++ and ---- . Inspired by ...
Sutter in “New Challenges” has a funny task 33 about how many identical characters of a given operator can be used in the correct C ++ code in a row (comments, preprocessor, macros, literals are not considered).
My question is - did the answer to this task change with the release of the C ++ 11/14 standard?
As I understand it, now the sequence >>>> becomes infinite - now there is no need to insert a space in the templates ...
The rest of the operators should seem to remain unchanged.
But now in C ++, the && construct has acquired another meaning. In this regard, the question is: did Sutter's decision remain unchanged from five in a row or can he now be surpassed ?
This is not a competition, but if someone surpasses Satter's solutions, it will be interesting to see. For reference:+ , - ! , ~ , * - trivial infinite sequences& - five pieces< , | - four... - not even funny :)
Yes, get two %% or there ^^ also simple:
class X { public: void operator%(int); }; typedef void(X::*F)(int); void operator%(F,X){} int main(int argc, const char * argv[]) { X x; &X::operator%%x; }
...are not three point operators . As for the six points - do not be shy, it's interesting to meet you :) - Harry