https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102588
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- Reduced test-case: namespace std { typedef int size_t; template <typename> class vector { public: typedef size_t size_type; }; } // namespace std typedef int quint32; typedef double qreal; class QPointF { qreal yp; }; namespace OpenOrienteering { class MapCoord; class MapCoordF : QPointF {}; typedef std::vector<MapCoord> MapCoordVector; class PathCoord { public: using size_type = quint32; using length_type = float; using param_type = MapCoordF; size_type index; param_type param; length_type clen; }; class PathObject { public: PathCoord findPathCoordForIndex(MapCoordVector::size_type); }; struct ObjectPathCoord : PathCoord { ObjectPathCoord(PathObject *, size_type); }; ObjectPathCoord::ObjectPathCoord(PathObject *object, size_type) : PathCoord{object->findPathCoordForIndex(index)} {} } // namespace OpenOrienteering