Understanding Safety of Function Pointers vs. Addresses of Functions

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 7 13:48:11 PDT 2015


On Tuesday, 7 July 2015 at 20:32:49 UTC, jmh530 wrote:
> Thanks for the detailed answer. All I meant here is that if I 
> have some
> T foo(T)(T x), then to take the address, sometimes I've needed 
> to &foo!int or &foo!real, etc.

Ah, sure. Templates don't have addresses. Function templates are 
not exempt from that. I think you always have to instantiate them 
in order take an address, not just sometimes.


More information about the Digitalmars-d-learn mailing list