Re: [Algorithms] Complexity of new hardware
Brought to you by:
vexxed72
|
From: Will V. <wi...@se...> - 2009-04-20 22:55:36
|
On Tue, 21 Apr 2009 04:55:20 +1200, Jon Watte <jw...@gm...> wrote: > You can actually use some template trickery to hoist the RTTI() / > MEMBER() parts into the struct itself. I think that's pretty neat, but it only moves, rather than removes the duplication, although I can see that it's easier to verify in one place like that. (I also needed to add an implementation to the cpp file to provide storage for foo::_theInfo to get it to link under VC9.) It also generates code-to-generate-data rather than data, which was something I was keen to avoid as much as possible. That said, if you remove the virtual base then the compiler generates pretty good code. That would allow you to separate the "find what type" code (one virtual call) from the "interrogate type data" (no virtual calls) code. Cheers, Will |