Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
98e92108
Commit
98e92108
authored
Mar 05, 2016
by
Wenzel Jakob
Browse files
Merge pull request #129 from bennybp/master
Use emplace for casting to map
parents
52f4c3ae
f4902ece
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
include/pybind11/stl.h
include/pybind11/stl.h
+1
-1
No files found.
include/pybind11/stl.h
View file @
98e92108
...
...
@@ -72,7 +72,7 @@ template <typename Type, typename Key, typename Value> struct map_caster {
if
(
!
kconv
.
load
(
it
.
first
.
ptr
(),
convert
)
||
!
vconv
.
load
(
it
.
second
.
ptr
(),
convert
))
return
false
;
value
[
(
Key
)
kconv
]
=
(
Value
)
vconv
;
value
.
emplace
(
(
Key
)
kconv
,
(
Value
)
vconv
)
;
}
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment