Guest User

Untitled

a guest
Oct 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. //OR
  2. template< class _T>
  3. struct DifferentBehaviourButSimiliarInterface {
  4.     void fn() { ... }
  5. }
  6.  
  7. template<>
  8. struct DifferentBehaviourButSimiliarInterface< SomeType > {
  9.     void fn() { ... }
  10. }
  11.  
  12. template< class _T >
  13. struct Generic : public DifferentBehaviourButSimiliarInterface< _T > {
  14.     void generic_call() {
  15.         //what problems with that ?
  16.     }
  17.     void fn(); // behavior of this call is depend of the main _T type...
  18. };
Add Comment
Please, Sign In to add comment