Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int _tmain(int, _TCHAR*)
- {
- int p = 10;
- auto fun = [p]() { std::cout << p << std::endl; };
- using Bar = decltype(fun);
- class Goo : public Bar
- {
- public:
- Goo(Bar zig)
- : Bar(zig)
- {
- }
- void operator()()
- {
- std::cout << "1 fejfiekgeo" << std::endl;
- Bar::operator()();
- }
- };
- Goo goo(fun);
- goo();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement