libstdc++: Fix bug in iterator_traits<common_iterator<S,I>>
authorJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 16:46:42 +0000 (16:46 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 16:54:54 +0000 (16:54 +0000)
commitd222d8ec3c100f5c0a6974e7dcee16903f6f0e3a
tree8d9d748edb42fa3e99f5548cdebfc34fbbbc5b6a
parent6fa476f6e1a07cf7fafec256ae52cdcb948b133d
libstdc++: Fix bug in iterator_traits<common_iterator<S,I>>

The wrong type was being used in the __common_iter_has_arrow constraint,
creating a circular dependency where the iterator_traits specialization
was needed before it was complete. The correct parameter for the
__common_iter_has_arrow concept is the first template argument of  the
common_iterator, not the common_iterator itself.

* include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
to take parameters of common_iterator, instead of the common_iterator
type itself. Fix argument for __common_iter_has_arrow constraint.
(iterator_traits<common_iterator<I, S>>::pointer): Adjust.
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_iterator.h