Re: [PATCH] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-05 Thread Jason Merrill via Gcc-patches
On 10/5/22 17:27, Marek Polacek wrote: This PR reports that struct Base {}; struct Derived : Base {}; static_assert(__reference_constructs_from_temporary(Base const&, Derived)); doesn't pass, which it should: it's just like const Base& b(Derived{}); where we bind 'b' to the Base

[PATCH] c++: fixes for derived-to-base reference binding [PR107085]

2022-10-05 Thread Marek Polacek via Gcc-patches
This PR reports that struct Base {}; struct Derived : Base {}; static_assert(__reference_constructs_from_temporary(Base const&, Derived)); doesn't pass, which it should: it's just like const Base& b(Derived{}); where we bind 'b' to the Base subobject of a temporary object of type