That was one way I attempted to do it. Problem? My compiler choked! The message was:
"Internal compiler error."
"Please submit a full bug report."
Ha! You know you're really desperate when you've pushed the compiler that far! :D
Anyway, I solved the problem by implementing an ingenious but simple functor algorithm. ;)
Hey if you like templates you should check out this site. It shows you how to use the compilation process as a meta-program using templates! This one guy wrote a class that when compiled, returned several errors, which, when viewed together, gave you a table of prime numbers! Quite interesting!
Damn! Can't find the bookmark. I'll get back to you with that URL, if you're interested.
Thanks JoeSixpack for your suggestion. :D
And thanks, too, FYB, for your detailed and most interesting suggestions. :D The 'subtlety' I was joking about was your use of 'UC' for 'you see' in the context of obfuscation versus clarity - I thought you made your point very well and quite amusingly. ;) I apologise for any offence my 'picky' and sometimes wicked sense of humour may have caused you - I really do appreciate your input. :)
I tried this and it actually calls the fn in current scope and not the base one as intended (see original post).
Your second and third suggestions, FYB, look very interesting/promising indeed. :)
But it looks like Sebastiani has already been there and killed a compiler with it. ;)
>>Anyway, I solved the problem by implementing an ingenious but simple functor algorithm.<<
Looks like 'functors' it is then... :)
Thanks again, everyone for all your input so far. It's given me a lot more to think about. Appreciated. :D
I'm curious about the compiler error you speak of. what about my example with class A, B, and C? does that kill your compiler? it shouldn't. I actually tried it and compiled fine.
I've actually spent some time thinking about this design in fact and it may proove to be a good starting point for a "Windows Template Library" :) WTL? All classes would be derived from some number of template classes.... hmmm...