Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. class Func {
  2. public:
  3.     template <typename T>
  4.     void operator()(T& x, const T& y) {
  5.         x = y;
  6.     }
  7. };
  8.  
  9. class Point {
  10. public:
  11.     Func f;
  12. };
  13.  
  14. class Assain {
  15. private:
  16.     Point *sub;
  17. public:
  18.     Assain() : sub(new Point) {}
  19.     ~Assain() { delete sub; }
  20.     Point*operator->() {
  21.         return sub;
  22.     }
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement