Quote:
Originally Posted by WhiteDragon
Although that may be valid syntax (can't check right now), I don't see how that would run the function. My guess is that it would just execute:
Storing the function in a temp.suckawhat, which would evaluate to 0(?), then 0 would be stored in temp.example.
If that actually works I may have to hurt someone though since it literally makes no sense.
|
The engine replaces inline function definitions with a function pointer (e.g., "function_1"). The return value of assignment should be the rvalue, so temp.f = function_1 returns that pointer. It's no mystery why it works. The mystery is why it doesn't work the way one would want it to.
Probably has something to do with the way normal function are declared.