Skip to content

Commit

Permalink
#796: reduce: use return value from emplace
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 8, 2020
1 parent 3710bf0 commit 3969222
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/vt/collective/reduce/reduce_scope.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,11 @@ T& ReduceScopeHolder<T>::getOnDemand(U&& scope) {
"Group reducers cannot be on-demand created -- needs spanning tree"
);

scopes_.emplace(
iter = scopes_.emplace(
std::piecewise_construct,
std::forward_as_tuple(scope),
std::forward_as_tuple(default_creator_(scope))
);
iter = scopes_.find(scope);
).first;
}

vtAssert(iter != scopes_.end(), "Scope must exist");
Expand Down

0 comments on commit 3969222

Please sign in to comment.