[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG #1589: The whole concept of forces/move_with_forces/forces_holde
From: |
David Philippi |
Subject: |
Re: BUG #1589: The whole concept of forces/move_with_forces/forces_holder needs to be rethought |
Date: |
Mon, 11 Nov 2002 16:27:01 +0100 |
User-agent: |
KMail/1.4.1 |
On Monday 11 November 2002 01:57, Gervase Lam wrote:
> Each action, which is derived from PinguAction, can then override the
> virtual function.
What about two differnt actions needing the same overwrite? You'll have to
duplicate it because you can't derive a virtual function from a class on the
same level or you'll have to put an intermediate class between the two
actions and PinguAction which does the override for both action classes.
> Isn't this tidier and therefore better than using member templates? Or am
> I missing something?
What problem do you have with member templates? They'll create an
implementation for every case they are instantiated with, that's all. A
member template isn't very different from a free standing function template,
it's only bound to a class scope and understanding templates in their
variations is a key point in making C++ really powerfull.
Templates can be very difficult to understand but a simple member template
shouldn't cause much problems. If you've got a general problem with templates
- just ask.
Bye David