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
e3aa215b
Unverified
Commit
e3aa215b
authored
Apr 11, 2022
by
Aaron Gokaslan
Committed by
GitHub
Apr 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add perfect forwarding to make_iterator calls (#3860)
parent
1b27b744
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
include/pybind11/pybind11.h
+6
-3
No files found.
include/pybind11/pybind11.h
View file @
e3aa215b
...
@@ -2403,7 +2403,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
...
@@ -2403,7 +2403,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
typename
Type
,
typename
Type
,
typename
...
Extra
>
typename
...
Extra
>
iterator
make_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
iterator
make_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
return
make_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
extra
...);
return
make_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
std
::
forward
<
Extra
>
(
extra
)...);
}
}
/// Makes an iterator over the keys (`.first`) of a stl map-like container supporting
/// Makes an iterator over the keys (`.first`) of a stl map-like container supporting
...
@@ -2412,7 +2413,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
...
@@ -2412,7 +2413,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
typename
Type
,
typename
Type
,
typename
...
Extra
>
typename
...
Extra
>
iterator
make_key_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
iterator
make_key_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
return
make_key_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
extra
...);
return
make_key_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
std
::
forward
<
Extra
>
(
extra
)...);
}
}
/// Makes an iterator over the values (`.second`) of a stl map-like container supporting
/// Makes an iterator over the values (`.second`) of a stl map-like container supporting
...
@@ -2421,7 +2423,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
...
@@ -2421,7 +2423,8 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
typename
Type
,
typename
Type
,
typename
...
Extra
>
typename
...
Extra
>
iterator
make_value_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
iterator
make_value_iterator
(
Type
&
value
,
Extra
&&
...
extra
)
{
return
make_value_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
extra
...);
return
make_value_iterator
<
Policy
>
(
std
::
begin
(
value
),
std
::
end
(
value
),
std
::
forward
<
Extra
>
(
extra
)...);
}
}
template
<
typename
InputType
,
typename
OutputType
>
template
<
typename
InputType
,
typename
OutputType
>
...
...
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