re PR c++/40308 (Brace initialization fails for member initializers in constructor...
commit4ea08463a743ae12a5273368c2cc50743818ad48
authorJason Merrill <jason@redhat.com>
Tue, 2 Jun 2009 17:02:38 +0000 (2 13:02 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 2 Jun 2009 17:02:38 +0000 (2 13:02 -0400)
treea4bc703b59430cc1c6271ad1407d17d48be44c0d
parentccafc19b5bd8f4736a2788263aa5acd6d2b7a961
re PR c++/40308 (Brace initialization fails for member initializers in constructor for class templates)

PR c++/40308
PR c++/40311
* typeck.c (cp_build_modify_expr): Always pass init-lists to the
conversion code.
* call.c (implicit_conversion): Allow init-list conversion to scalar
during direct-initialization, too.  Mark the conversion bad if it
has too many levels of braces.
(convert_like_real): And give a helpful error.

From-SVN: r148089
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/initlist13.C
gcc/testsuite/g++.dg/cpp0x/initlist18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/initlist19.C [new file with mode: 0644]