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
[specialized.algorithms] Qualify declarator-id with sub-namespace. #4458
base: main
Are you sure you want to change the base?
Conversation
That sounds as if you qualified all those actually in
Are the * Although consistent with the second decision
I noticed that There's also the case for
If you decide you qualify |
I think what I did is consistent with the changes done elsewhere in [algorithms] by the other pull request(s) linked in #2512. The Thus, I think the most important aspect is qualifying the declarator-id. I have qualified the I think the presentation would deteriorate if we attempted to qualify everything. Maybe a valid fallback position is to say that names in the return type are interpreted as-if they were in a trailing return type, and thus don't really need qualification at all. (Such an as-if approach breaks down for names (e.g. concept-ids) in template-parameter-lists and requires-clauses, though, so maybe a better conceptual approach would be to say that the qualification of the declarator-id is instead considered to be turned into a @tkoeppe , do you think we need more discussion in a wider forum here, or does #2512 establish sufficient precedent? |
This seems like an improvement. @jwakely, @CaseyCarter: any final thoughts? |
I like it, but it does seem strange that |
Well, but that seems to be how we do things, all the other uses of |
Yes, and that seems strange 🙂 |
Yeah. I'd be happy to entertain suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an improvement. Qualifying borrowed_iterator_t
(here and elsewhere) can be done separately if desired.
You can't have std::range without strange! |
So... I sense general approval, or at least lack of sustained opposition? @CaseyCarter, final chance to veto? |
Also qualify return types where necessary.
@CaseyCarter Going once, twice, ... |
I've been avoiding comment on this change because it seems like utter chaos to qualify some of the names but not all of the names from a particular namespace. I was perfectly happy with wrapping these declarations in That said, I haven't participated in the editorial discussions that led to this new style so I feel I should keep my uninformed opinions to myself. |
@CaseyCarter, the status quo is all of the other algorithms use the style this change wants to achieve, i.e. showing a qualified declarator-id. This approach solved #2512, where it was observed that (without any qualification at all) our In general, the standard does not use I suggest to apply this patch regardless as a consistency improvement, and discussing a whoiesale change to a |
I'm aware it's the status quo, and I'm aware of #2512, I'm simply uncertain that the fix is an improvement.
I'm not opposed to this change , I just don't like it =) |
Understood. There's no need to rush this. Do you have any other ideas how one could disambiguate the itemdecls? Or if not, which do you prefer between the status quo and this proposed style? Or do you dislike both equally much? |
As decided in #2656, return types from the sub-namespace were qualified as well.
"namespace ranges { ... }" was excised from \itemdecl.
Partially addresses #2512
Fixes #4253