Closed Quuxplusone closed 3 days ago
The error itself was fixed by llvm#78929.
But it probably shouldn't claim to be convertible at all.
I think the convertibility issue for __wrap_iter
(same for __bounded_iter
) has been tracked in llvm#50058. I think that is being fixed now.
Fixed, thanks @frederick-vs-ja!
https://godbolt.org/z/z5E4eMGeW
The above snippet's
static_assert
passes, but the next line hard-errors when instantiating the expression(it == jt)
:The immediate culprit is that
__bounded_iter<T>
claims to be implicitly convertible from__bounded_iter<U>
:But it probably shouldn't claim to be convertible at all.
__bounded_iter
should follow exactly the same pattern as__wrap_iter
in terms of how it implements its conversions and comparison operators. See "The economist’s $100 bill, and the virtue of consistency" (2022-01-20).