Also, it's no good airplanes. Do you really want to be on the receiving end of an acute case of motion sickness?
Project Pluto was supposed to be used on Earth. You know, if the Americans can't have it, then at least the commies wouldn't have it, either.
Wait, you're not using the stack?
Ok, back to serious mode - I'm working on small embedded stuff, and memory is either allocated statically or it's on the stack in the form of local variables. new/delete/malloc/free don't appear in my code, either.
Isn't an offer you can expect pretty close to market pricing?
IIRC, doing this will have undefined behavior. It may work the way you describe, or it may do anything else.
Depending on your platform, putting the check there might interfere with CPU load/latency constraints (and using a bigger CPU might interfere with power/cost constraints), while having the CPU just return zero as the result of division by zero can be handled later (when it doesn't interfere with CPU load/latency).
You can pick one of the two and make no promises about the other.
Or does "cross-platform" in this context mean "Linux+Windows"?
I assume by something like this:
((my_class *) (0))->somemethod();
As long as somemethod() doesn't try to access any class members, the code may even fail to show any obvious misbehavior.
So you think that money is the root of all evil. Have you ever asked what is the root of money? -- Ayn Rand