practicalswift
commented at 3:18 pm on July 26, 2018:
contributor
Mark single-argument constructors explicit.
Rationale:
Avoid unexpected implicit promotions.
From the developer notes:
By default, declare single-argument constructors explicit.
Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions.
Mark single-argument constructors "explicit"1ac3c983bf
MarcoFalke
commented at 3:48 pm on July 26, 2018:
member
Would be nice if explicit was the default for constructors unless you specify otherwise, but I guess we are stuck with cpp currently works.
Is there was a flag for a compile time warning or similar at least?
MarcoFalke added the label
Refactoring
on Jul 26, 2018
kallewoof
commented at 7:11 pm on July 30, 2018:
member
Concept ACK (unexpected implicit promotions are bad and 9 lines is OK), assuming there is a compile flag or non-false-positive-inducing linter that can plug this.
practicalswift
commented at 9:51 am on July 31, 2018:
contributor
Forgot to include this excerpt from the developer notes:
By default, declare single-argument constructors explicit.
Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions.
MarcoFalke
commented at 12:09 pm on July 31, 2018:
member
utACK1ac3c983bfe06f75542e4f4e30142952802a46d8
promag
commented at 1:37 pm on July 31, 2018:
member
utACK1ac3c98. Are there more candidates?
practicalswift
commented at 1:48 pm on July 31, 2018:
contributor
@promag Thanks for reviewing! These should be all AFAIK :-)
Empact
commented at 7:35 pm on August 2, 2018:
member
utACK1ac3c983bfe06f75542e4f4e30142952802a46d8
practicalswift
commented at 4:16 pm on August 27, 2018:
contributor
Ready for merge? :-)
MarcoFalke referenced this in commit
dd34204611
on Aug 27, 2018
MarcoFalke merged this
on Aug 27, 2018
MarcoFalke closed this
on Aug 27, 2018
deadalnix referenced this in commit
1d9e07db1b
on May 16, 2020
ftrader referenced this in commit
8320077dd5
on Aug 17, 2020
practicalswift deleted the branch
on Apr 10, 2021
pravblockc referenced this in commit
9d7e83a113
on Jul 26, 2021
pravblockc referenced this in commit
e05eda83f5
on Aug 3, 2021
pravblockc referenced this in commit
d68094b3b7
on Aug 3, 2021
gades referenced this in commit
9ba8b9a90a
on May 9, 2022
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-19 00:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me