need help to get member function const address
Boris Carvajal
boris2.9 at gmail.com
Thu Mar 19 23:46:01 UTC 2020
On Thursday, 19 March 2020 at 14:43:53 UTC, Steven Schveighoffer
wrote:
> I think this is an invalid limitation, you should file an issue
> at https://issues.dlang.org
>
> essentially, with your sample A struct:
>
> const f1 = &A.fn; // OK
> const f2 = &A.d; // Error, not constant expression
>
> Both these should be valid, &A.d is not a delegate, but a
> function pointer.
>
> -Steve
https://issues.dlang.org/show_bug.cgi?id=20687
https://github.com/dlang/dmd/pull/10946
More information about the Digitalmars-d-learn
mailing list