pair<vector<int>,int> - . .
, ( , , var_name). in-line , , , - pair<vector<int>,int>(...). ... ( (y) ). , y, ... 0, .
So, we get pair<vector<int>,int>(vector<int>(y), 0). This is rather cumbersome, so the standard library provides a template function std::make_pair. This is because template arguments cannot be deduced for constructors using a free function (which can do inference with template arguments) to invoke the constructor.
Thus, the above is shortened to make_pair(vector<int>(y), 0), which when substituted in the rest of the line gives Benjamin Lindley's answer.
source
share