https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98639

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Arthur O'Dwyer from comment #0)
> I actually suspect that this behavior is related to C++20's paren-init for
> aggregates;

Yes, and the change to allow aggregates to have base classes. Derived(b)
initializes the base class from b.

> it might even be conforming?

It is.

> But there's no way this behavior
> was *intentional.* A value of type Base shouldn't be castable to Derived.

Some people seem to think otherwise.

https://twitter.com/wakomeup/status/1274778577087627267

Reply via email to