libstdc++: Remove workarounds for constrained nested class templates
authorJonathan Wakely <jwakely@redhat.com>
Thu, 4 Jun 2020 22:20:49 +0000 (23:20 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 4 Jun 2020 22:20:49 +0000 (23:20 +0100)
commitf2242ec0d3f1bb13c78ef3c21e0354d84fe57222
tree1cda192a6b07a09edcc723f210b8a0f51483cb43
parentb825a22890740f341eae566af27e18e528cd29a7
libstdc++: Remove workarounds for constrained nested class templates

With PR c++/92078 and PR c++/92103 both fixed, nested class templates
can now be constrained. That means a number of namespace-scope helpers
can be moved to the class scope, so they're only visible where they're
needed.

* include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
(__detail::__cat, __detail::__diff): Move to class scope in the
relevant __iterator_traits specializations.
(__iterator_traits<>): Use nested class templates instead of ones from
namespace __detail.
* include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
class scope in iterator_traits<common_iterator<I, S>>.
(iterator_traits<common_iterator<I, S>>): Use nested class template
instead of __detail::__common_iter_ptr.
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/include/bits/stl_iterator.h