fork download
  1. template <typename T>
  2. class Action
  3. {
  4. typedef int CommandFunction;
  5.  
  6. Action(CommandFunction cf, T* t) {}
  7. };
  8.  
  9. class ObjectController
  10. {
  11. public:
  12. template<template<class> class Action, class T>
  13. Action<T>* createAction(typename Action<T>::CommandFunction cf, T * t);
  14. };
  15.  
  16. template<template<class> class Action, class T>
  17. Action<T> * ObjectController::createAction(typename Action<T>::CommandFunction cf, T * t)
  18. {
  19. return new Action<T>(cf, t);
  20. }
  21.  
  22. int main()
  23. {
  24. ObjectController oc;
  25. }
Success #stdin #stdout 0.02s 2720KB
stdin
Standard input is empty
stdout
Standard output is empty