-
Notifications
You must be signed in to change notification settings - Fork 778
[inplace.vector] Use T*
, not pointer
, for some return types
#7322
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
Conversation
This is editorial for now. But P3160 "allocator-aware `inplace_vector`" *might* change the definition of `pointer` (that's still up in the air), and if so, we definitely want `try_emplace_back` to continue returning a raw pointer, not some kind of fancy pointer. Make that change now, so that we don't have to worry about it during the discussion of P3160.
At the present stage, this change feels undermotivated to me (as an editorial change). The paper changing the |
If |
I'm also for deprecation. As of C++23, the |
In the current working paper, |
Yeah. But I think the intent is making the return types of |
Let's have such changes when/if LWG / LEWG does decide to change the definition of "pointer". Then it's intentional what the @jwakely , is there some LWG-level motivation to have this changed editorially? |
This has always been editorial, so yeah, we "don't need" any editorial change, by definition. The original motivation here was to front-load this editorial change in order to minimize P3160's diff (exactly the motivation @jensmaurer just gave, except, front-loading the intentionality: we commit up front that we really do want the current behavior, That said, P3160 is abandoned/rejected at this point, so unless it comes back as a result of NB comment, the only motivation to prefer |
There are likely a lot of places where we could replace a use of a local typedef with a template parameter, and it would be editorial, so if the answer to "why do it here" is "because that's the intention of future paper X", then the right approach is to have future paper X do it, to explicitly surface that intentionality in the wording diff (even though that makes the diff slightly larger). |
This is editorial for now. But P3160 "allocator-aware
inplace_vector
" might change the definition ofpointer
(that's still up in the air), and if so, we definitely wanttry_emplace_back
to continue returning a raw pointer, not some kind of fancy pointer. Make that change now, so that we don't have to worry about it during the discussion of P3160.Marking as "draft" until @phalpern confirms that this is desirable (or at least not harmful) from his POV too.