#include <iostream>
#include <functional>

using namespace std;

int main() {
  int i = 0;
  function<void()>
    do_inc = [&i]() -> void { i++; };

  cout << i << endl;
  do_inc();
  cout << i << endl;
}
