FWIW, I realize that global state is not “captured” by lambdas, which is why globals are still in scope in a lambda. I just wish there was a way to control how much state leaked into a scope as much as state leaking out of a scope.
Can C++ lambdas explicitly capture nothing — even global state? Haven’t found anything showing it. Being able to do so would take lambdas to such a new level, I would almost never use “normal” function syntax.
-
-
Näytä tämä ketjuKiitos. Käytämme tätä aikajanasi parantamiseen. KumoaKumoa
-
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.