forked from lwg/issues
-
Notifications
You must be signed in to change notification settings - Fork 32
Allocator position #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Allocator position #468
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <?xml version='1.0' encoding='utf-8' standalone='no'?> | ||
| <!DOCTYPE issue SYSTEM "lwg-issue.dtd"> | ||
|
|
||
| <issue num="4334" status="New"> | ||
| <title><code>taskYour Titlelt;...Your Titlegt;::promise_type</code> supports arbitrary <code>allocator_arg</code> position</title> | ||
| <section><sref ref="[task.promise]"/></section> | ||
| <submitter>Dietmar Kühl</submitter> | ||
| <date>31 Aug 2025</date> | ||
| <priority>99</priority> | ||
|
|
||
| <discussion> | ||
| <p> | ||
| Normally the <code>allocator_arg</code> argument has to be the first | ||
| argument when present. For <code>task<...>::promise_type</code> | ||
| the <code>allocator_arg</code> can appear at an arbitrary position | ||
| (except the last because it always needs to be followed by the | ||
| allocator). This permission is inconsistent and the position of the | ||
| <code>allocator_arg</code> argument and the allocator should be | ||
| limited to come first. | ||
| </p> | ||
| <p> | ||
| For containers the optional support for allocators is implemented | ||
| once for every container. For coroutines the optional support for | ||
| allocators is implemented once for every coroutine definition. To | ||
| support an optional allocator the coroutine definition needs to use | ||
| an allocator and either gets duplicated not using an allocator or | ||
| a forwarding function is added which adds the default allocator. | ||
| With the flexible allocator position optional allocator support can be provided | ||
| using a trailing argument list, i.e., adding <code>, auto&&...</code>. | ||
| Instead of constraining <code>task</code> it may be more reasonable | ||
| to add the flexibility to <code>generator</code>. | ||
| </p> | ||
| </discussion> | ||
|
|
||
| <resolution> | ||
| <p> | ||
| </p> | ||
| </resolution> | ||
|
|
||
| </issue> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.