-
- Downloads
c++: Fix crash with broken deduction from {} [PR97895]
Unfortunately, the otherwise beautiful for (constructor_elt &elt : *CONSTRUCTOR_ELTS (init)) is not immune to an empty constructor, so we have to check CONSTRUCTOR_ELTS first. gcc/cp/ChangeLog: PR c++/97895 * pt.c (do_auto_deduction): Don't crash when the constructor has zero elements. gcc/testsuite/ChangeLog: PR c++/97895 * g++.dg/cpp0x/auto54.C: New test.
Loading
Please register or sign in to comment