/in/foo.cc: In function 'double getdis(std::pair<double, double>, std::pair<double, double>)':
/in/foo.cc:40:7: error: expected unqualified-id before '[' token
auto [x1,y1]=a;
^
/in/foo.cc:41:7: error: expected unqualified-id before '[' token
auto [x2,y2]=b;
^
/in/foo.cc:42:15: error: 'x1' was not declared in this scope
return hypot(x1-x2,y1-y2);
^~
/in/foo.cc:42:18: error: 'x2' was not declared in this scope
return hypot(x1-x2,y1-y2);
^~
/in/foo.cc:42:24: error: 'y2' was not declared in this scope
return hypot(x1-x2,y1-y2);
^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:59:8: error: expected unqualified-id before '[' token
auto [x,y,v]=per[i];
^
/in/foo.cc:61:19: error: 'x' was not declared in this scope
db dis=getdis({x,y},pos[j]);
^
/in/foo.cc:61:21: error: 'y' was not declared in this scope
db dis=getdis({x,y},pos[j]);
^
/in/foo.cc:61:30: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<double, double>'
db dis=getdis({x,y},pos[j]);
^
/in/foo.cc:62:15: error: 'v' was not declared in this scope
db tim=dis/v;
^