Closed
Description
In the class synopsis:
template<auto f>
function_ref(nontype_t<f>, auto) -> function_ref<see below>;
The detailed specifications uses a forwarding parameter.
That's consistent with the actual constructors,
as it doesn't require copy on the caller side when deducing.function_ref(nontype_t<f>, auto&&) -> function_ref<@\seebelow@>;
In the deduction guide's detailed specifications:
template<auto f, class T>
function_ref(nontype_t<f>, T&&) -> function_ref<see below>;
The second parameter in the class synopsis is actually
auto
.
That requires a copy, as opposed toT&&
.
So I can't solve this editorially here,
but it can be done in the class synopsis.
To be consistent with my suggestion on the class synopsis:
template<auto f> function_ref(nontype_t<f>, auto&&) -> function_ref<@\seebelow@>;
Originally: #6357 (comment), #6357 (comment).
Metadata
Metadata
Assignees
Labels
No labels
Activity
frederick-vs-ja commentedon Jun 29, 2023
Presumably the second
auto
shouldn't be used here, see CWG2697.JohelEGP commentedon Jun 29, 2023
Thank you.
For now, I suggested #6357 (comment).
If that's not editorially accepted, an LWG issue might be needed.
tkoeppe commentedon Jul 21, 2023
Could you please make a separate PR for this, after the motions?
JohelEGP commentedon Jul 21, 2023
Yes.
Remaining motions: https://github.com/cplusplus/draft/issues?q=is%3Aissue+is%3Aopen+Motion+in%3Atitle.
Commit to be rebased on
main
afterwards: 34305cc.JohelEGP commentedon Jul 22, 2023
Opened #6398.