Revert attributes to their defaults with default keywords

Daniel Kozák via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 9 04:16:48 PST 2015


V Fri, 9 Jan 2015 14:11:00 +0200
ketmar via Digitalmars-d <digitalmars-d at puremagic.com> napsáno:

> can it be used like this:
> 
>   final:
>   nothrow:
>     ...
>     default void foo () { ... }
>     ...
> 
> so only `foo` becomes default, but all other methods after `foo` are
> `final nothrow`?

not now, but I plan add this
for now you can use:
default { void foo () { ... }}

> 
> and can it be used like this:
> 
>   default void foo () nothrow { ... }
> 
> so `default` resets all attrs and then i can specify another set of
> attrs inline?

same as the first one but this works:

default { void foo () nothrow { ... }}



More information about the Digitalmars-d mailing list