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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -