ericniebler / stl2

LaTeX and Markdown source for the Ranges TS/STL2 and associated proposals
88 stars 8 forks source link

split_view::outer_iterator converting constructor is slightly wrong #600

Open ericniebler opened 5 years ago

ericniebler commented 5 years ago

In split_view::outer_iterator<V, Pattern>, when V is not const-iterable, we must avoid forming the type iterator_t<const V> since it will fail to compile.

Proposed Resolution

 constexpr outer_iterator(outer_iterator<!Const> i)
-  requires Const && ConvertibleTo<iterator_t<V>, iterator_t<const V>>;
+  requires Const && ConvertibleTo<iterator_t<V>, iterator_t<Base>>;

EDIT: I'm actually not 100% certain this change is necessary or if it is merely needed to avoid a gcc bug.