|
Boost : |
From: Jonathan Wakely (cow_at_[hidden])
Date: 2005-01-13 13:05:03
On Thu, Jan 13, 2005 at 03:53:30PM +0000, Tom Widmer wrote:
> How about:
>
> class Finaliser
> {
> friend class Final;
> Finaliser(){}
> };
>
> class Final : private virtual Finaliser
> {
> };
>
> ?
Yeah, that works, but Finaliser has to know about Final in advance, you
can't just (virtually) derive an existing class from Final to make it
final (which is what I think the OP's solution was trying to achieve
with templates - but you're not allowed template params as friends).
jon
-- "That which needs to be proved cannot be worth much." - Nietzsche
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk