Skip to content

Commit a91e57c

Browse files
committed
[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)