After reading Hidden Features and Dark Corners of C++/STL on comp.lang.c++.moderated, I was completely surprised that the following snippet compiled and worked in both Visual Studio 2008 and G++ 4.4.
It wouldn’t have surprised me at all, if they did (they love their keywords), but that one actually isn’t a keyword. It’s an extension method implemented for the various number types, so you can also write 5.downTo(1).
It wouldn’t have surprised me at all, if they did (they love their keywords), but that one actually isn’t a keyword. It’s an extension method implemented for the various number types, so you can also write
5.downTo(1)
.