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

[tuple.apply] Redundant/inconsistent std:: qualification for std::get #4948

Closed
dangelog opened this issue Sep 28, 2021 · 5 comments · Fixed by #4951
Closed

[tuple.apply] Redundant/inconsistent std:: qualification for std::get #4948

dangelog opened this issue Sep 28, 2021 · 5 comments · Fixed by #4951
Assignees

Comments

@dangelog
Copy link
Contributor

The definition of std::apply uses std::get, although spelling std:: shouldn't be necessary (due to the [contents]). In the very same section, std::make_from_tuple calls get without qualification. It would be nice to unify the two one way or another.

@jensmaurer
Copy link
Member

The problem is that neither apply-impl nor make-from-tuple-impl are shown to be in namespace std, so that unqualified lookup doesn't actually find std::get.

@jwakely, what's your preference:

  • put apply-impl and make-from-tuple-impl inside namespace std and get rid of std:: in std::get or
  • leave the namespaces as-is and qualify get and index_sequence in make-from-tuple-impl and apply-impl.

@jensmaurer jensmaurer changed the title Redundant/inconsistent std:: qualification for std::get in [tuple.apply] [tuple.apply] Redundant/inconsistent std:: qualification for std::get Sep 29, 2021
@dangelog
Copy link
Contributor Author

Hi,
That's a good point. I guess qualifying is a good idea, given also the presence of forward in there?

@jensmaurer
Copy link
Member

No, std::forward and std::move are special (by convention in the standard; nothing special about them per se).

@CaseyCarter
Copy link
Contributor

I'd prefer wrapping our exposition-only functions with namespace std {} to avoid confusion. I could live with fully-qualifying all names in such functions as if they were in the global namespace. I would rather not have some names qualified (std::get) and others not (size_t, index_sequence) without good reason. ("We always qualify move and forward" isn't a good reason, but that's really a separate issue.)

@jwakely
Copy link
Member

jwakely commented Sep 29, 2021

I agree with Casey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants