[dmd-beta] rvalue references
Andrej Mitrovic
andrej.mitrovich at gmail.com
Thu Apr 12 09:53:41 PDT 2012
On 4/12/12, Max Samukha <maxsamukha at gmail.com> wrote:
> I think the language should allow taking addresses of references in unsafe
> context. One valid and fairly frequent case is passing the address to C:
>
> extern(C) external_foo(S* s);
>
> void foo(ref S s)
> {
> external_foo(&s);
> }
>
FWIW You can actually use 'ref' in an extern(C) function:
extern(C) external_foo(ref S s);
wxD uses it.
More information about the dmd-beta
mailing list