c++: vector of class with bool ctor [PR108195]
authorJason Merrill <jason@redhat.com>
Mon, 23 Jan 2023 20:03:47 +0000 (15:03 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 23 Jan 2023 21:12:52 +0000 (16:12 -0500)
commit72e46b3c7ad5e3d2c69868a510c00707c356106a
tree218c54255f31d8b9e40755b49935af4a9349564e
parent771d793df1622a476e1cf8d05f0a6aee350fa56b
c++: vector of class with bool ctor [PR108195]

The transformation done by r13-4564 to use the iterator constructor instead
of the initializer-list constructor breaks if the iterator pointers are
themselves treated as elements of an initializer-list, so check for that.

PR c++/108195

gcc/cp/ChangeLog:

* call.cc (build_user_type_conversion_1): Check whether the
iterators also find a list ctor.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-vect2.C: New test.
gcc/cp/call.cc
gcc/testsuite/g++.dg/cpp0x/initlist-vect2.C [new file with mode: 0644]