c++: Fix SEGV with malformed constructor decl.
In the testcase, since there's no declaration of T, ref_view(T) declares a non-static data member T of type ref_view, the same type as its enclosing class. Then when we try to do C++20 aggregate class template argument deduction we recursively try to adjust the braced-init-list to match the template class definition until we run out of stack. Fixed by rejecting the template data member. PR c++/92593 * decl.c (grokdeclarator): Reject field of current class type even in a template.
Showing
Please
register
or
sign in
to comment