[Issue 22901] Can't construct inout SumType
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 21 12:37:04 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22901
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/phobos pull request #8413 "Fix issue 22901 - Can't construct inout
SumType" was merged into master:
- d9d104c9bc64540c3ab87cc15665aeb9d0d11e4e by Paul Backus:
Fix issue 22901 - Can't construct inout SumType
The template constraint is needed to ensure that the inout constructor
overload is only considered when it is an exact match, without qualifier
conversions.
Without the constraint, a constructor call such as
const(SumType!(int[]))([1, 2, 3])
...would be ambiguous, since it would match both the const constructor
overload and the inout constructor overload at the "match with qualifier
conversion" level.
https://github.com/dlang/phobos/pull/8413
--
More information about the Digitalmars-d-bugs
mailing list