In Java, I use
if (a != null && a.fun());
by taking full advantage of short-circuit evaluation and expression are evaluated from left to right?
In C++, can I do the same? Are they guarantee to portable across different platform and compiler?
if (a != 0 && a->fun());