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
556277d6
"git@developer.sourcefind.cn:gaoqiong/pybind11.git" did not exist on "43dbdfd0e738939e25b84deb60fc6b253a9a5ea2"
Commit
556277d6
authored
Mar 14, 2020
by
fatvlady
Committed by
Wenzel Jakob
Jun 29, 2020
Browse files
Fix optional dereference type deduction
parent
a3daf87d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
include/pybind11/stl.h
include/pybind11/stl.h
+2
-1
No files found.
include/pybind11/stl.h
View file @
556277d6
...
@@ -266,7 +266,8 @@ template<typename T> struct optional_caster {
...
@@ -266,7 +266,8 @@ template<typename T> struct optional_caster {
static
handle
cast
(
T_
&&
src
,
return_value_policy
policy
,
handle
parent
)
{
static
handle
cast
(
T_
&&
src
,
return_value_policy
policy
,
handle
parent
)
{
if
(
!
src
)
if
(
!
src
)
return
none
().
inc_ref
();
return
none
().
inc_ref
();
policy
=
return_value_policy_override
<
typename
T
::
value_type
>::
policy
(
policy
);
using
dereference_type
=
decltype
(
*
std
::
forward
<
T_
>
(
src
));
policy
=
return_value_policy_override
<
dereference_type
>::
policy
(
policy
);
return
value_conv
::
cast
(
*
std
::
forward
<
T_
>
(
src
),
policy
,
parent
);
return
value_conv
::
cast
(
*
std
::
forward
<
T_
>
(
src
),
policy
,
parent
);
}
}
...
...
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