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ä ketju
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.
20.23 - 19. tammik. 2019
0 vastausta
0 uudelleentwiittausta
1 tykkäys
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.