Oddbean new post about | logout
 nostr:npub1aw2gcqz09z6lq5w5thzcadjsy8n7srs8mczkgs4c5rvjyyfh96nsg38vv5 Well, technically this is lecit as the `this `pointer is not relevant being `nullptr`.

If we assume that the call `ptr->someFunction()`is ideally expanded as `MyScaryClass::someFunction(ptr)` as the vtable is not accessed.

However, any decent compiler (with the relevant warnings enabled) should warn this is not the best way to write this piece of code.