Go style selection statements "if (init; condition)" is by far my favorite upcoming C++17 feature. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0305r1.html …
Interestingly, you can already do this! if(X* pX = GetX()) {/*use pX*/} The syntax just isn't as clear/obvious? Not sure the goal of if(;)
-
-
Crank up warnings, pretty sure any compiler warns about this. ; is there probably to make it clear what's intention and avoid this warning.
-
I can see that. I guess I've become accustomed to it as a feature. Not a hidden bug. Explicit is good tho.
- Näytä vastaukset
Uusi keskustelu -
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.