Sign in to follow this  
edwinnie

compile time poly & base ptrs & policy classes

Recommended Posts

edwinnie    122
hey! jus wondering how do u pple combine a class with template policies, with a base class, under compile time polymorphism. Also i was wondering if there was a way to store coarse level ptrs for such implementations so that we can store them and do the downcasting (no virtual funcs).

Share this post


Link to post
Share on other sites
Shannon Barber    1681
'compile-time polymorphism' is a misgnomer, it dones't work like "regular polymorphism but at compile-time", it's quite different.


Policy template parameters are either classes or template classes passed in as template parameters or template-template parameters respectively.

"Modern C++ Design" covers the topic in depth, you can also check out the loki library (on sourceforge) which accompanies MCD.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this