Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
bf0c7dcc
Commit
bf0c7dcc
authored
Apr 18, 2016
by
Wenzel Jakob
Browse files
convenience overload for make_iterator()
parent
1dc940d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+4
-0
No files found.
include/pybind11/pybind11.h
View file @
bf0c7dcc
...
@@ -1013,6 +1013,10 @@ template <typename Iterator, typename... Extra> iterator make_iterator(Iterator
...
@@ -1013,6 +1013,10 @@ template <typename Iterator, typename... Extra> iterator make_iterator(Iterator
return
(
iterator
)
cast
(
state
{
first
,
last
});
return
(
iterator
)
cast
(
state
{
first
,
last
});
}
}
template
<
typename
Type
,
typename
...
Extra
>
iterator
make_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
return
make_iterator
(
std
::
begin
(
value
),
std
::
end
(
value
),
extra
...);
}
template
<
typename
InputType
,
typename
OutputType
>
void
implicitly_convertible
()
{
template
<
typename
InputType
,
typename
OutputType
>
void
implicitly_convertible
()
{
auto
implicit_caster
=
[](
PyObject
*
obj
,
PyTypeObject
*
type
)
->
PyObject
*
{
auto
implicit_caster
=
[](
PyObject
*
obj
,
PyTypeObject
*
type
)
->
PyObject
*
{
if
(
!
detail
::
type_caster
<
InputType
>
().
load
(
obj
,
false
))
if
(
!
detail
::
type_caster
<
InputType
>
().
load
(
obj
,
false
))
...
...
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