Re: [PATCH] libstdc++: invalid default init in _CachedPosition [PR101231]

2021-07-15 Thread Jonathan Wakely via Gcc-patches
On Tue, 13 Jul 2021 at 20:09, Patrick Palka via Libstdc++ wrote: > > The primary template for _CachedPosition is a dummy implementation for > non-forward ranges, the iterators for which generally can't be cached. > Because this implementation doesn't actually cache anything, _M_has_value > is defi

[PATCH] libstdc++: invalid default init in _CachedPosition [PR101231]

2021-07-13 Thread Patrick Palka via Gcc-patches
The primary template for _CachedPosition is a dummy implementation for non-forward ranges, the iterators for which generally can't be cached. Because this implementation doesn't actually cache anything, _M_has_value is defined to be false and so calls to _M_get (which are always guarded by _M_has_v