Bug 19147 – Reduce template bloat in std.complex by using const arguments

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-06T22:46:59Z
Last change time
2020-03-21T03:56:34Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-08-06T22:46:59Z
Labeling scalar arguments as const even when not logically necessary allows the same type to be inferred for a template function when called with const, non-const, & immutable scalars.
Comment #1 by n8sh.secondary — 2018-08-06T22:57:53Z
Comment #2 by b2.temp — 2018-08-07T08:38:57Z
take care with the tittle, this could have an impact on the change log. If you wanted to say that you handle this issue then use the "assignee" field or add the pull keyword.
Comment #3 by github-bugzilla — 2018-08-10T20:59:05Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/043ef8f7537b3e22b65f59480a1704e1b6f40e4d Fix Issue 19147 - Reduce template bloat in std.complex by using const arguments Labeling variably-typed arguments of templated functions as const causes the same type to be inferred when the argument is const, non-const, and immutable. https://github.com/dlang/phobos/commit/565a51f8c6e8b703c0b625568a6f14473345f5d8 Merge pull request #6656 from n8sh/issue-19147-complex-antibloat Fix Issue 19147 - Reduce template bloat in std.complex by using const arguments merged-on-behalf-of: Petar Kirov <[email protected]>