C++ pattern matching is coming

Dukc ajieskola at gmail.com
Tue Oct 25 09:36:55 UTC 2022


On Tuesday, 25 October 2022 at 09:33:36 UTC, Dukc wrote:

> ```D
> @trusted Pointee* asPtr() return scope {return data;}
> @trusted ref Pointee opUnary(string op)() return
>   if(op == "*")
> { return *data;
> }
> ```

Lower function should be `return scope`, not `return`.


More information about the Digitalmars-d mailing list