https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95888

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

cat pr95888.ii
template <typename PolyCollection> class local_iterator_impl {
  using const_segment_map_iterator =
      typename PolyCollection::const_segment_map_iterator;
  template <typename Iterator>
  local_iterator_impl(const_segment_map_iterator, Iterator);
  template <typename> friend class local_iterator_impl;
  friend PolyCollection;
};
template <typename> class poly_collection {
  template <typename> using enable_if_acceptable = int *;
  using segment_map = int;
  using const_segment_map_iterator = segment_map;
  template <typename> friend class local_iterator_impl;
  template <typename>
  using local_iterator_impl = local_iterator_impl<poly_collection>;
public:
  template <typename T> using const_local_iterator = local_iterator_impl<T>;
  template <typename> class const_segment_info {
  public:
    const_local_iterator<int> begin() { return {it, 0}; }
    const_segment_map_iterator it;
  };
  template <typename T, enable_if_acceptable<T> = nullptr>
  const_segment_info<T> segment();
};

int
main() {
  poly_collection<int> n;
  n.segment<int>().begin();
}

Reply via email to