|
Boost : |
From: Bob Bell (belvis_at_[hidden])
Date: 2005-04-27 11:29:02
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk