When to prefer templated policy based design over non-templated inheritance based design
问题 I am trying to understand the real requirement of the usage of templates for policy based design. Going through the new templated designs in C++ I found that policy based class design is a highly suggested way of design which allows you to 'plug-in' different behaviors from policy classes. A minimal example is the following (a shortened version of the wiki): template <typename LanguagePolicy> class HelloWorld : private LanguagePolicy { using LanguagePolicy::message; public: // Behaviour