daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef STATEEVOLVER_H
  2. #define STATEEVOLVER_H
  3.  
  4. #include "Vehicle.hh"
  5.  
  6. class stateevolver
  7. {
  8. public:
  9.     stateevolver();
  10.     template<typename T> void evolveState(T, double time);
  11. };
  12.  
  13. // Template specialization declarations for functions using either std::vector<vehicle*> or single vehicle pointer
  14.  
  15. template<>
  16. void stateevolver::evolveState<std::vector<vehicle*>&>(std::vector<vehicle*> & , double time);
  17.  
  18. template<>
  19. void stateevolver::evolveState<vehicle*>(vehicle*, double time);
  20.  
  21.  
  22. #endif
  23.      
  24. template<>
  25. void stateevolver::evolveState<std::vector<vehicle*>&>(std::vector<vehicle*> & vehicleVec, double time) {
  26. }
  27.      
  28. MyStateEvolver.evolveState(vectorOfVehiclePointers, time); // COMPILE ERROR
  29.      
  30. undefined reference to `void stateevolver::evolveState<std::vector<vehicle*, std::allocator<vehicle*> > >(std::vector<vehicle*, std::allocator<vehicle*> >, double)'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top