[Issue 22901] Can't construct inout SumType
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 20 19:11:40 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22901
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@pbackus created dlang/phobos pull request #8413 "Fix issue 22901 - Can't
construct inout SumType" fixing this issue:
- 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