Guest User

Untitled

a guest
Sep 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class Interface
  2. {
  3. public:
  4. virtual void foo(int) = 0;
  5. };
  6.  
  7. class PreviousClass : public Interface
  8. {
  9. public:
  10. void foo(int)
  11. {
  12. /* implementation */
  13. }
  14. };
  15.  
  16. template <typename T>
  17. class CommonImpl
  18. {
  19. public:
  20. void foo(T) { /* implementation */ }
  21. }
  22.  
  23. class ConcreteClassInt : public Interface, public CommonImpl
  24. {
  25. public:
  26. ConcreteClass(): CommonImpl<int>() {}
  27. }
Add Comment
Please, Sign In to add comment