I want to re-seat a pair of references refPair
int a, b, c, d;
pair<int&, int&> refPair(a, b);
Doing this seems to cause values of c and d to be copied to a and b, which I don't want
refPair = pair<int&, int&>(c, d);
Doing this however doesn't
new(&refPair) pair<int&, int&>(c, d);
I want to know if this is legal and doesn't cause any undefined behavior. It works fine with my compiler but I'm not sure if its portable.