value->refcount=1;
*keyval = T::keyval_id_;
- T::keyvals_.insert({*keyval, value});
+ T::keyvals_.emplace(*keyval, value);
T::keyval_id_++;
return MPI_SUCCESS;
}
return MPI_ERR_ARG;
elem->refcount++;
int flag=0;
- auto p = attributes().insert({keyval, attr_value});
+ auto p = attributes().emplace(keyval, attr_value);
if (not p.second) {
int ret = call_deleter<T>((T*)this, elem, keyval,p.first->second,&flag);
// overwrite previous value
if (elem->copy_fn.comm_copy_fn == MPI_COMM_DUP_FN ||
((elem->copy_fn.comm_copy_fn_fort != MPI_NULL_COPY_FN) && *(int*)*elem->copy_fn.comm_copy_fn_fort == 1)) {
elem->refcount++;
- (*newcomm)->attributes().insert({it.first, it.second});
+ (*newcomm)->attributes().emplace(it.first, it.second);
} else if (flag) {
elem->refcount++;
- (*newcomm)->attributes().insert({it.first, value_out});
+ (*newcomm)->attributes().emplace(it.first, value_out);
}
}
}
if (elem->copy_fn.type_copy_fn == MPI_TYPE_DUP_FN ||
((elem->copy_fn.type_copy_fn_fort != MPI_NULL_COPY_FN) && (*(int*)*elem->copy_fn.type_copy_fn_fort == 1))) {
elem->refcount++;
- attributes().insert({it.first, it.second});
+ attributes().emplace(it.first, it.second);
} else if (flag) {
elem->refcount++;
- attributes().insert({it.first, value_out});
+ attributes().emplace(it.first, value_out);
}
}
}