I guess your statement is that the last line, (func(p)) could be rewritten as (func(data)) instead. I can see that.
The timer API: size or type safety?
Posted Jan 3, 2007 19:48 UTC (Wed) by rjbell4 (guest, #35764)
[Link]
The reason you wouldn't necessarily do that is that "data" may actually be an expression that has a side effect, so you don't want to reference it twice.
The timer API: size or type safety?
Posted Jan 3, 2007 19:59 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246)
[Link]
So, I guess typeof(*data) doesn't evaluate data then? I guess that makes sense.
The timer API: size or type safety?
Posted Jan 3, 2007 20:01 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246)
[Link]
Actually, hold on... (0 && func(data)) shouldn't evaluate data a second time under any circumstances anyway.