A pattern I'd like to see more of - Parsing template parameter tuples

Jacob Carlborg doob at me.com
Mon May 21 14:36:32 UTC 2018


On Monday, 21 May 2018 at 14:23:07 UTC, Steven Schveighoffer 
wrote:

> But how do you use it?
>
> SomeObject!(Options(true, false, 42, "guess what this does"))

Yes, or if you want something more readable:

enum Options options = { foo: true, bar: false, a: 42, b:  "guess 
what this does" };
SomeObject!options o;

--
/Jacob Carlborg


More information about the Digitalmars-d mailing list