d coder writes:
> 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
I just want to point out that this *should* be doable in D.
Simon Wrote:
> You could make function pointers compile time constants if:
>
> You disallow ASR
> You disallow them when compiling to a dll
> You disallow in-lining of any function of which you take the address
> You disallow the linker from rearranging functions
> You disallow the linker from me
On 21/02/2011 00:24, Steven Schveighoffer wrote:
On Sun, 20 Feb 2011 16:23:14 -0500, Nick Sabalausky wrote:
"Simon" 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
fou
On Sun, 20 Feb 2011 16:23:14 -0500, Nick Sabalausky wrote:
"Simon" 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 poi
"Simon" 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 shoul
Thanks Simon.
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
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