Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAllEightUp

Posted 07 April 2013 - 08:50 PM

So put the source code in the header file?

 

That is the common solution.  The other solution as mentioned is to do something like:

 

 

template GENERIC_STACK< int >;

 

in the source to force implementation of a specific version of the template.  (I believe I have that correct, rarely implement a full class that way, just members.)

 

PS. this is not a good idea in general, putting the code in the header to be generated at compile time is better than forcing a compile time generation of the entire class.


#1AllEightUp

Posted 07 April 2013 - 08:49 PM

So put the source code in the header file?

 

That is the common solution.  The other solution as mentioned is to do something like:

 

template GENERIC_STACK< int >;

 

in the source to force implementation of a specific version of the template.  (I believe I have that correct, rarely implement a full class that way, just members.)


PARTNERS