On 20/02/2011 14:59, d coder wrote:
Greetings

I tried to initialize a struct member with a function pointer, and
found that DMD2 did not like it. Are not function pointers compile
time constants? And why they should not be?

Regards
- Cherry

No a function doesn't have an address until the .exe is loaded into memory. And with Address space randomisation on 'doze there is no reasonable way to make a function pointer a compile time value.

--
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk

Reply via email to