Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
3b48482f
Commit
3b48482f
authored
Jul 01, 2016
by
Wenzel Jakob
Committed by
GitHub
Jul 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #262 from merlinND/make-tuple-error-message
More informative error message when `py::make_tuple` fails
parents
00062595
68ca3b63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
include/pybind11/cast.h
+10
-3
No files found.
include/pybind11/cast.h
View file @
3b48482f
...
@@ -838,9 +838,16 @@ template <return_value_policy policy = return_value_policy::automatic_reference,
...
@@ -838,9 +838,16 @@ template <return_value_policy policy = return_value_policy::automatic_reference,
{
object
(
detail
::
type_caster
<
typename
detail
::
intrinsic_type
<
Args
>::
type
>::
cast
(
{
object
(
detail
::
type_caster
<
typename
detail
::
intrinsic_type
<
Args
>::
type
>::
cast
(
std
::
forward
<
Args
>
(
args_
),
policy
,
nullptr
),
false
)...
}
std
::
forward
<
Args
>
(
args_
),
policy
,
nullptr
),
false
)...
}
};
};
for
(
auto
&
arg_value
:
args
)
for
(
auto
&
arg_value
:
args
)
{
if
(
!
arg_value
)
if
(
!
arg_value
)
{
throw
cast_error
(
"make_tuple(): unable to convert arguments to Python objects"
);
#if defined(NDEBUG)
throw
cast_error
(
"make_tuple(): unable to convert arguments to Python object (compile in debug mode for details)"
);
#else
throw
cast_error
(
"make_tuple(): unable to convert arguments of types '"
+
(
std
::
string
)
type_id
<
std
::
tuple
<
Args
...
>>
()
+
"' to Python object"
);
#endif
}
}
tuple
result
(
size
);
tuple
result
(
size
);
int
counter
=
0
;
int
counter
=
0
;
for
(
auto
&
arg_value
:
args
)
for
(
auto
&
arg_value
:
args
)
...
...
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