digitalmars.D - Style guide for indentation of template restrictions
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (9/9) Aug 22 2020 Is there code convention for the indentation of template
- MoonlightSentinel (3/12) Aug 22 2020 The D Style suggests the latter, see
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (11/28) Aug 23 2020 If so, dfmt's `dfmt_template_constraint_style` [1] should default
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) ?
Aug 22 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
Aug 22 2020
On Saturday, 22 August 2020 at 22:15:04 UTC, MoonlightSentinel wrote:On Saturday, 22 August 2020 at 20:26:40 UTC, Per Nordlöw wrote:If so, dfmt's `dfmt_template_constraint_style` [1] should default to conditional_newline or always_newline instead of conditional_newline_indent [1] https://github.com/dlang-community/dfmt#dfmt-specific-propertiesIs 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
Aug 23 2020