Weird use of `?:` in `typeid` code
I think it is an optimisation! A little known and rarely (you could say “never”) used feature of typeid is that a null dereference of the argument of typeid throws an exception instead of the usual UB. What? Are you serious? Are you drunk? Indeed. Yes. No. int *p = 0; *p; // UB typeid …