   Cross-Template Static Functions
  When you have a static function in a class, it will run the same across any instance of that class.  My problem arises when I throw templates into the mix.  Is there any way for a templated class to contain a function which executes the same across not only all classes in the same template but just across all instances regardless of the template in use?  Thanks 
  Yes, make the template class definition derived from a class which in turn has the static member function. That way, all versions of the template class have that same base, therefore the same static member function. ;  Ahh.  In this advice there is much wisdom.  Thanks! ;  Wait a second though, then when I access it I still have to deal with template parameters.  How should I work those? ;  Any help? ;  Nevermind I got it, thanks for your help Polymorphic OOP.  I see the light now!The trick is that instead of accessing the static function through the templated class you access it through the base class.  Ahhh, in this there is much wisdom. ;quote:Original post by 31337    Wait a second though, then when I access it I still have to deal with template parameters.  How should I work those?   Make a static member function in the templated classes as well. Inside that function do all of the template-specific stuff, and from that function call the function in the base class as well.EDIT: I've noticed you've been doing a lot of consecutive replies in your threads. Please try to make use of the edit button from now on, and don't bump the threads as much! We're not all checking the forums all of the time. We'll get to your thread eventually.   [edited by - Polymorphic OOP on August 4, 2003 2:13:46 PM]