Can I write this if statement one line? – stackoverflow.com

I was wondering if there was a way to put this on one line? if (auto r = getGlobalObjectByName(word)) r->doSomething; // This works fine if (!auto r = getGlobalObjectByName(word)) r->...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Can I write this if statement one line? – stackoverflow.com"