3 ms·
It's been so long since I've programmed in C++ that I can't even read this code. Last time I wrote an anonymous function I had to use boost::lambda, now there's
by 0xff00ffee 7y ago
It's been so long since I've programmed in C++ that I can't even read this code. Last time I wrote an anonymous function I had to use boost::lambda, now there's an override for [] on line 39? And wtf is the arrow operator doing out there in space on line 19?
Starting the day with heavy dose of FOMO...
- thestoicattack 7y agoL19 is a trailing return type. L39 et seq. is a lambda expression.
- 0xff00ffee 7y agoThanks. Native lambdas. Huh. It's like waking up to see people flying their cars to work. :)
- steveklabnik 7y agoHere are the docs, if you're curious: https://en.cppreference.com/w/cpp/language/lambda https://en.cppreference.com/w/cpp/language/lambda
- gumby 7y ago> Starting the day with heavy dose of FOMO... I don't know if you should "F" necessarily but you are "MO" :-) C++ has become a completely new language, with a large carbuncle of back compatibility attached (though they've been slowly deprecating some of that). I like programming in modern C++ and am lucky enough to be able to compile everything std=c++17 (which we recently changed to =c++20 though support for that standard is just starting to appear). It's quite an expressive and powerful language. Though a lot of the legacy stuff is ugly, it does give you access to older code, external libraries and the like. So you can write clear code using modern C++ and still be able to link in older code. Pretty nice.