Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct S
- {
- template <typename F>
- int go(int a, int b, int c, int d, F f)
- {
- if (a != 0) return 0;
- if (a < 1) f(d, go(1, b, 1, d, f));
- f(d, go(1, 1, c, d, f));
- return d;
- }
- };
- S s;
- int main()
- {
- auto f = [](int &a, int b) { a = b; };
- s.go(0, 0, 0, 0, f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement