annoying:
https://blog.jetbrains.com/clion/2018/06/iso-cpp-committee-rapperswil-2018-trip-report/
Huge. C++20 most likely won't have Modules.
That's disappointing. I hate my compile times (yes, yes, my code is bad, modularization sucks, coupling is tight as hell, etc, etc). But I hate. And I hoped that modules in the standard (=> the same in all three major compilers, I'm building on all of them) would force me to grow and improve structure and design.
Annoying. Implicit capture of this via [=] is now deprecated.
I use lambdas a lot, and I use [=] capture a lot. Many (almost all?) of my closures are guarded by one way or another:
1. They'll automatically unsubscribe themselves when this dies.
or
2. They're guarded by weak pointer to this, so that they're safe to be called even if this is already dead.
Either way, I'm always capturing this by [=], all the time. And converting it to [=, this] will kill half of fun and all of beauty. I've never had a bug (yet?) with incorrect capture of this inside a [=] lambda.
And the motivation (confusion with the newly introduced [*this] capture-by-value) doesn't work for me — I can't imagine (yet?) a single case of [*this] capture in my code :(
Жалко престона, он копировал this по значению в лямбдах
Обсуждают сегодня