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
Post a Comment