
27 Apr
2005
27 Apr
'05
4:29 p.m.
Thorsten Ottosen <nesotto <at> cs.auc.dk> writes:
"David Abrahams" <dave <at> boost-consulting.com> wrote in message news:uk6mo2ylf.fsf <at> boost-consulting.com... | "Thorsten Ottosen" <nesotto <at> cs.auc.dk> writes: | | > A "value object" implies something that behaves as an int; a | > "polymophic object" implies something that needs to allocated | > dynamically and which has virtual functions. | | A polymorphic object doesn't need to be allocated dynamically.
if you want it to act polymophic you have to.
Nonsense: class B { /* abstract base class */ }; class D : public B { /* implementation */ }; void F(B& obj) { // call B virtual functions } void G() { D d; F(d); } How is D not being used polymorphically inside F()? Bob