
From: christopher diggins <cdiggins@videotron.ca>
From: "Preston A. Elder" <prez@neuromancy.net>
First, that the policy stuff is all static. This makes it impossible for me to have two or more individual profilers going, using the same policy, but, say, a different output file, without making the policy extremely complex and doing all kinds of string matching to sort out whats what.
How would you propose doing it differently?
I think he is referring to the approach of deriving from the policies such that they can have non-static data members. This also means that you would typically call the policy member functions without qualifying them with the policy class name. Note that deriving from the policies introduces the whole issue of MI versus chaining. The former has size and performance implications. The latter imposes structure on the policy classes: template <typename Base> struct policy1 : Base { }; template <typename Base> struct policy2 : Base { }; template <typename Policy1, typename Policy2> struct example : Policy1<Policy2> { }; -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;