
23 Apr
2004
23 Apr
'04
11:40 a.m.
John Torjo <john.lists@torjo.com> writes:
Matthew Vogt wrote:
Like the following:
I guess it depends on how much you're willing to pay for syntactic sugar...
we're talking the same language ;) It seems that we posted our solutions at about the same time ;) My solution however does not involve any virtual call.
Calling through internally stored function pointers may be a minor improvement over using virtual functions, but that's not crystal clear to me. It seems likely that compilers might optimize away the virtual calls because all vtables are known to be strictly constant, but the other optimization seems less likely. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com