Skip to content

Commit b71cc32

Browse files
burblebeetkoeppe
authored andcommitted
LWG3862 basic_const_iterator's common_type specialization is underconstrained
1 parent 29df82b commit b71cc32

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/iterators.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,17 @@
350350
class basic_const_iterator; // freestanding
351351

352352
template<class T, @\libconcept{common_with}@<T> U>
353+
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
353354
struct common_type<basic_const_iterator<T>, U> { // freestanding
354355
using type = basic_const_iterator<common_type_t<T, U>>;
355356
};
356357
template<class T, @\libconcept{common_with}@<T> U>
358+
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
357359
struct common_type<U, basic_const_iterator<T>> { // freestanding
358360
using type = basic_const_iterator<common_type_t<T, U>>;
359361
};
360362
template<class T, @\libconcept{common_with}@<T> U>
363+
requires @\libconcept{input_iterator}@<common_type_t<T, U>>
361364
struct common_type<basic_const_iterator<T>, basic_const_iterator<U>> { // freestanding
362365
using type = basic_const_iterator<common_type_t<T, U>>;
363366
};

0 commit comments

Comments
 (0)