I want to move a pair of refPair links
int a, b, c, d; pair<int&, int&> refPair(a, b);
Doing this seems to copy the values โโof c and d to copy to and b, which I don't want
refPair = pair<int&, int&>(c, d);
Doing this, however, does not
new(&refPair) pair<int&, int&>(c, d);
I want to know if this is legal and does not cause any undefined behavior. It works great with my compiler, but I'm not sure if its portable.
source share