std::pair<Object, OtherObject*> currentData;
void OnCallback()
{
Object object = getObject();
OtherObject* otherObject = new OtherObject();
currentData = std::make_pair(object, otherObject);
}
Is make_pair
atomic? Will make_pair
copy or move the fields from its return value to currentData
? If I have another thread accessing the value of currentData
, is there any potential that currentData
's value will be incomplete when it's accessed?
Unfortunately I didn't see any related information in the standard docs for make_pair
.