[Bug c++/95369] braced-init-list with designated initializers as template-argument rejected
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 5 19:51:46 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95369
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:cecc73af4980004502f4c327b6c639125defb379
commit r11-1010-gcecc73af4980004502f4c327b6c639125defb379
Author: Marek Polacek <polacek@redhat.com>
Date: Fri Jun 5 14:22:35 2020 -0400
c++: Make braced-init-list as template arg work with aggr init [PR95369]
Barry pointed out to me that our braced-init-list as a template-argument
extension doesn't work as expected when we aggregate-initialize. Since
aggregate list-initialization is a user-defined conversion sequence, we
allow it as part of a converted constant expression.
Co-authored-by: Jason Merrill <jason@redhat.com>
gcc/cp/ChangeLog:
PR c++/95369
* call.c (build_converted_constant_expr_internal): Allow
list-initialization.
gcc/testsuite/ChangeLog:
PR c++/95369
* g++.dg/cpp2a/nontype-class38.C: New test.
More information about the Gcc-bugs
mailing list