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

[ranges.syn] Forward declarations of tuple_size and tuple_element are not shown in the synopsis #4572

Closed
frederick-vs-ja opened this issue Apr 2, 2021 · 3 comments · Fixed by #4573
Assignees

Comments

@frederick-vs-ja
Copy link
Contributor

The forward declarations of these two primary templates (which are not defined) are shown in [tuple.syn], [utility.syn], and [array.syn], but not in [ranges.syn], which is inconsistent.
Perhaps it should be resolved editorially, as the declarations of these two primary templates are effectively required in <ranges>.

@jensmaurer
Copy link
Member

One could argue that the public names need not be made available, even if partial specializations are shown. tuple.helper p6+8 say

In addition to being available via inclusion of the <tuple> header, the template is available when any of the headers <array>, <ranges>, or <utility> are included.

And we do make the primary templates available in <array> and <utility>, where we also introduce partial specializations. So, this looks like an oversight.

@jensmaurer
Copy link
Member

@jwakely, would you consider the addition of

 template<class T> struct tuple_size;
 template<size_t I, class T> struct tuple_element;

to the <ranges> synopsis as editorial, i.e. not changing the intended meaning of the standard?

@jwakely
Copy link
Member

jwakely commented Apr 2, 2021

Yes, I think this is editorial.

In general it's true that names user implicitly in a header are not necessarily made available by that header. But for partial specializations I think it's reasonable to expect the primary template to be declared too (I don't see much advantage to introducing compiler magic to make it work). And in this case we do say they're made available by <ranges>.

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.

3 participants