Skip to content
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

Names from namespace std::pmr need to be qualified LWG 2818 #2269

Open
jwakely opened this issue Jul 18, 2018 · 4 comments
Open

Names from namespace std::pmr need to be qualified LWG 2818 #2269

jwakely opened this issue Jul 18, 2018 · 4 comments
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.

Comments

@jwakely
Copy link
Member

jwakely commented Jul 18, 2018

[contents] says:

Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise.

Names in subclause [mem.res] are in the nested namespace std::pmr so names like get_default_resource() need to be qualified, otherwise [contents] means that it refers to ::std::get_default_resource() (which doesn't exist).

Maybe at the start of a subclause like [mem.res] we need to say that for the rest of the subclause names are fully qualified as either ::std::x or std::pmr::x as appropriate.

[time] and [filesystem] have similar issues for names in ::std::chrono and std::filesystem respectively. See also #1793.

@CaseyCarter
Copy link
Contributor

I noticed this - and went to look at chrono and filesystem to see what we do there - when I was thinking about the same problem for std::ranges. Perhaps we need to change the blanket wording to more generically claim that all names are fully qualified without reference to a specific namespace?

@CaseyCarter
Copy link
Contributor

...and at the same time establish an editorial convention for annotating names that are not intended to be fully qualified. They're rare enough that it would be helpful to call attention to them.

@jensmaurer
Copy link
Member

@CaseyCarter, the whole point of this "fully qualified" stuff seems to be to disable ADL. So, we should simply say that in [contents] and stop repeating ourselves in sub-namespaces. See #1913 for the editorial meeting discussion.

@jwakely
Copy link
Member Author

jwakely commented Jul 25, 2019

I'm assigned to fix [contents] via LWG 2818.

@jensmaurer jensmaurer changed the title Names from namespace std::pmr need to be qualified Names from namespace std::pmr need to be qualified LWG 2818 Jun 27, 2020
@jensmaurer jensmaurer added the lwg Issue must be reviewed by LWG. label Jun 27, 2020
@jensmaurer jensmaurer added the not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking. label Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lwg Issue must be reviewed by LWG. not-editorial Issue is not deemed editorial; the editorial issue is kept open for tracking.
Projects
None yet
Development

No branches or pull requests

3 participants