Date: Wed, 1 Jul 2026 10:18:33 +0200
Then why not call the respective f() functions from the constructors?
-----Ursprüngliche Nachricht-----
Von:Rainer Deyke via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Mi 01.07.2026 08:26
Betreff:Re: [std-proposals] c++ proposal
An:std-proposals_at_[hidden];
CC:Rainer Deyke <rainerd_at_[hidden]>;
On 7/1/26 08:12, Sebastian Wittmeier via Std-Proposals wrote:
> Making f() virtual is a bit confusing:
>
>
> During construction only the base member function is called. So it could be non-virtual as well?
Making f() virtual is the whole point of the example. When called from
base::base, base::init calls base::f. When called from
derived1::dervived1, base::init calls derived1::f. When called from
derived2::dervived2, base::init calls derived2::f.
--
Rainer Deyke - rainerd_at_[hidden]
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-07-01 08:22:42
