c++ - non template function in a template class -


i wondering if there way place non template function within template class. put don't want compiler repeat function each type since function manipulating pointers hence there no type. possible?

so if have code this

template <typename t> class class{  }; 

then each function within repeated each type t don't want happen

i function static types , there not repeat in memory each individual type.

inherit function base class

class base_class { public:     static void not_a_templated_function(); };  template <typename t> class class: public base_class {  }; 

Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -

javascript - ng-class not responding to change in model in Angular? -