$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-01-22 13:13:20
"Joaquín Mª López Muñoz" <joaquin_at_[hidden]> wrote
> If you accept this [no delete], I see no problem in *publicly* deriving
> A_with_data from A and use the former as a substitute of the latter:
>
There's one implicit assumption in this approach: user won't overwrite
(non-virtual) interface of container, e.g. no push_back() with logging
# of calls.
But this is not enforceable technically and having derived class makes it
tempting 'just to add some little functionality'.
The solution I have in mind is more complicated (for library writer)
but safer (IMHO) agains misuse.
/Pavel