I have been seeing code like this in submissions at leetcode.com and I don't understand it. My unfamiliarity with the syntax has made it hard to search for an explanation.
static const int _ = []() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
return 0;
}()
I gather that the I/O calls are an effort to increase execution speed. What I am not grasping is the syntax- is this a function definition, or a lambda expression? How is this code ever executed?