Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Func {
- public:
- template <typename T>
- void operator()(T& x, const T& y) {
- x = y;
- }
- };
- class Point {
- public:
- Func f;
- };
- class Assain {
- private:
- Point *sub;
- public:
- Assain() : sub(new Point) {}
- ~Assain() { delete sub; }
- Point*operator->() {
- return sub;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement