
13 Jan
2005
13 Jan
'05
6:05 p.m.
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