[Issue 18618] templated functions should in general have their attributes inferred

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 17 04:55:27 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18618

--- Comment #2 from Carsten Blüggel <chilli at posteo.net> ---
(In reply to Jonathan M Davis from comment #1)
> Templated functions should have their attributes inferred when whether
> attributes make sense depend on the template arguments (which the often do).
> However, if the attributes don't depend on the template arguments, then they
> really should be explicit. Whether any of the ones listed should have
> attributes inferred which currently are explicit, I don't know (I'd have to
> study them to know), and it's quite possible that all of the attributes
> listed here should be removed, but I don't think that it's a good policy to
> just not put attributes on templated functions. Whether they should be there
> or not depends on whether they depend on the template arguments.

Your guideline is new for me (but makes sense to me).
Please, add this to https://dlang.org/dstyle.html, which "misguided" me.

--


More information about the Digitalmars-d-bugs mailing list