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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -