Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a91e57c

Browse files
[std-map] do not use operator[], but emplace() to deal with non-default-constructible case
1 parent c59e1b5 commit a91e57c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎include/eigenpy/std-map.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct dict_to_map {
142142
bp::throw_error_already_set();
143143
}
144144
typename Container::mapped_type val = valproxy();
145-
map[key] = val;
145+
map.emplace(key, val);
146146
}
147147

148148
// remember the location for later

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /