This is a GNU extension on ternary operation according to the Wikipedia.
iMyVal = --iVal ?: iDft;
While I’m fully aware that this is a GNU extension, but sometimes things may come in very handy with this special syntax.
So, does anybody know if this syntax is only available in gcc? Or are they any other compilers which support it?
to anyone who’s interested, PHP started supporting this syntax from 5.3
Thanks in advance.
Some answers:
noyes – the LLVM online compiler compiles it successfully.Bottom line –
not wide-spread. Only Intel’s compiler, which is almost 100% gcc-compatible, supports this.?