opEquals() non-standard return type
Jacob Shtokolov
jacob.100205 at gmail.com
Thu Jan 24 11:41:46 UTC 2019
On Wednesday, 23 January 2019 at 17:28:37 UTC, H. S. Teoh wrote:
> The best way to do this is to use a string DSL or a delegate as
> template argument. For example:
>
> auto result = User.filter!q{ User.name == "John" };
>
> or:
>
> auto result = User.filter!(u => u.name == "John");
>
I didn't know about q{} token strings! This looks very cool for
implementing different DSLs.
Thank you!
More information about the Digitalmars-d-learn
mailing list