I've been coding in C++ for a long time and recently come across tying for pairs. Please can someone explain why the following code doesn't work or suggest an equivalent replacement?
pair<int,pair<int,int>> x = {10,{3,5}};
int w, u, v;
tie(w,tie(u,v)) = x;
I can get around it with this:
w = x.ff;
tie(u,v) = x.ss;
It just doesn't feel as nice. Many thanks