"Simon" <s.d.hamm...@gmail.com> wrote in message news:ijrdif$1nn6$1...@digitalmars.com... > 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. >
I didn't know Windows did that, I thought it was just certain versions of Unix/Linux. Do you happen to know which version of Windows was first to have it?