File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -289,10 +289,12 @@ class concat_view<_Views...>::__iterator : public __concat_view_iterator_categor
289289
290290 template <typename _Func>
291291 _LIBCPP_HIDE_FROM_ABI constexpr auto __invoke_at_index (_Func&& __func) const {
292- return [&__func, this ]<std::size_t _Is>(this auto && __self) {
293- if (_Is == __it_.index ()) {
292+ // TODO(GCC 16): Just capture `this` when GCC PR113563 and PR121008 are fixed.
293+ return [&__func, &__view_iter = *this ]<std::size_t _Is>(this auto && __self) {
294+ if (_Is == __view_iter.__it_ .index ()) {
294295 return __func.template operator ()<_Is>();
295- } if constexpr (_Is + 1 < sizeof ...(_Views)) {
296+ }
297+ if constexpr (_Is + 1 < sizeof ...(_Views)) {
296298 return __self.template operator ()<_Is + 1 >();
297299 }
298300 __builtin_unreachable ();
You can’t perform that action at this time.
0 commit comments