Prev: How to call templated static function from another template function?
Next: Is it possible to use object functions as arguments to the inner_product algorithm?
From: usenet only_tech_talk on 23 Mar 2010 03:23 The best I've been able to come up with is to bypass the intermediary class B<> and do the required modification to bar() in the derived class C: class C : A< C >{ typedef A< C > impl_; public: void bar(){ impl_::bar(); // do something else. } private: friend class A<C>; void foo()const{} }; But this set up has to be repeated in all classes, D, E etc. that require a modified bar() i.e. genericity is lost. I suppose that's as good as it gets. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |