undefined, , ,
. bar()
;
undefined. ( Base::bar(),
, ).
, ,
; g++, , ,
.
, , ,
.
3
, 1 2 -.
And the statement that "a pure virtual function cannot be called from the constructor" is false. The only time a problem occurs is dynamic resolution allows a pure virtual function. A call with a static permission (provided that it exists) is fine, and a call to a pure virtual function in the base class is fine if the dynamic resolution does not appear to be a pure virtual function in the derived class, whose constructor has or is started.
source
share