Style guide for indentation of template restrictions

MoonlightSentinel moonlightsentinel at disroot.org
Sat Aug 22 22:15:04 UTC 2020


On Saturday, 22 August 2020 at 20:26:40 UTC, Per Nordlöw wrote:
> Is there code convention for the indentation of template 
> restrictions?
>
> Should a restriction be indented as
>
>     void f(U)(U a, ref U b)
>         if (isUnsigned!U)
>
> or not as in
>
>     void f(U)(U a, ref U b)
>     if (isUnsigned!U)
>
> ?

The D Style suggests the latter, see 
https://dlang.org/dstyle.html#phobos_declarations


More information about the Digitalmars-d mailing list