Skip to content

Commit

Permalink
LWG3398 tuple_element_t is also wrong for const subrange
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawn Perchik authored and zygoloid committed Feb 27, 2020
1 parent f4af894 commit 28fe6c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/ranges.tex
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@
struct tuple_element<1, ranges::subrange<I, S, K>> {
using type = S;
};
template<class I, class S, ranges::subrange_kind K>
struct tuple_element<0, const ranges::subrange<I, S, K>> {
using type = I;
};
template<class I, class S, ranges::subrange_kind K>
struct tuple_element<1, const ranges::subrange<I, S, K>> {
using type = S;
};
}
\end{codeblock}

Expand Down

0 comments on commit 28fe6c3

Please sign in to comment.