Date: Wed, 1 Jul 2026 08:26:27 +0200
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.
> 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]
Received on 2026-07-01 06:26:37
