Re:The long arrow operator in C++
by trelliscoded on Thursday July 13, 2017 @04:36PM
(#14764950)
In the dashed case, k is going to be zero or one (a<b is true or false). This works, though:
[ Parent
| on HN ]
Re:The long arrow operator in C++
by alejohausner on Thursday July 13, 2017 @04:39PM
(#14764975)
I just spent an hour constructing a class called Morse such that this outputs "HELLO WORLD!":
Morse m;
cout << (++++m) << (+m) << (+-++m) << (+-++m) << (---m) << ", "
<< (+--m) << (---m) << (+-+m) << (+-++m) << (-++m) << "!\n";
Damn you, C++! Why won't you let me overload the . operator? ;-)