From e5901560633ce741df65202f21afbb4733af8753 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 1 Jun 2010 23:55:28 -0400 Subject: re PR c++/44358 ([C++0x] initializer list can't convert to map) PR c++/44358 * call.c (build_list_conv): Set list-initialization flags properly. From-SVN: r160131 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/call.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'gcc/cp') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5944313..1cb2baf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-06-01 Jason Merrill + + PR c++/44358 + * call.c (build_list_conv): Set list-initialization flags properly. + 2010-06-01 Nathan Froyd * typeck2.c (build_x_arrow): Make types_memoized a VEC. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 64e2e50..4062702 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -589,6 +589,12 @@ build_list_conv (tree type, tree ctor, int flags) unsigned i; tree val; + /* Within a list-initialization we can have more user-defined + conversions. */ + flags &= ~LOOKUP_NO_CONVERSION; + /* But no narrowing conversions. */ + flags |= LOOKUP_NO_NARROWING; + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val) { conversion *sub -- cgit v1.1