std.typecons.Flag -- public import for API users?

rcorre via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 26 05:55:16 PDT 2015


On Tuesday, 24 March 2015 at 16:41:28 UTC, Rene Zwanenburg wrote:
> Should not be necessary. privately import Flag and make a 
> public alias:
>
> module a;
> import std.typecons : Flag;
>
> alias SomeFlag = Flag!"SomeFlag";
>
> SomeFlag.Yes and SomeFlag.No should be usable in other modules 
> without additional imports.

Nice idea Rene, thanks!


More information about the Digitalmars-d-learn mailing list