No UFCS with nested functions?
Paul Backus
snarwin at gmail.com
Tue Nov 5 04:16:47 UTC 2019
On Tuesday, 5 November 2019 at 00:34:33 UTC, Nicholas Wilson
wrote:
> https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/
>
> struct S {
> ubyte[12] bar;
> }
>
> alias I(alias f) = f;
>
> bool foo (ref S s)
> {
> static bool prop(const(ubyte)[] f) {
> return f.length > 1;
> }
> return s.bar[].I!prop;
> }
It's in Phobos:
import std.meta: Alias;
return s.bar[].Alias!prop
More information about the Digitalmars-d-learn
mailing list