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

Missing template declaration in [array.tuple] #2553

Closed
mclow opened this issue Dec 3, 2018 · 7 comments
Closed

Missing template declaration in [array.tuple] #2553

mclow opened this issue Dec 3, 2018 · 7 comments

Comments

@mclow
Copy link
Contributor

mclow commented Dec 3, 2018

In [array.tuple] (in N4778 and 4788), we see:

template<class T, size_t N>
     struct tuple_size<array<T, N>> : integral_constant<size_t, N> { };

tuple_element<I, array<T, N>>::type

I'm thinking that the tuple_element bit should look more like this:

template<class T, size_t N>
     tuple_element<I, array<T, N>>::type
@jwakely
Copy link
Member

jwakely commented Dec 3, 2018

It needs size_t I as well.

I think this style of presentation is intentional, not a mistake. That doesn't make it good though.

@jwakely
Copy link
Member

jwakely commented Dec 3, 2018

See [pair.astuple] and [variant.helper] as well.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 3, 2018

Looks like this has been broken size the first commit.

@tkoeppe
Copy link
Contributor

tkoeppe commented Dec 3, 2018

I think we should add the missing template head to all those cases (the variant-values variant_alternative and pair's and array's tuple_element.

@jensmaurer
Copy link
Member

But what does it mean? tuple_element<I, array<T, N>>::type is not valid C++ either way, if type is in fact a typedef: You can't have out-of-line definitions of member typedefs.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 20, 2018
@JohelEGP
Copy link
Contributor

#2476 and https://wg21.link/LWG3166 are related.

@jensmaurer
Copy link
Member

Duplicate of #2786.

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Sep 10, 2019
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

No branches or pull requests

5 participants