Skip to content

Missing template declaration in [array.tuple] #2553

Closed
@mclow

Description

@mclow
Contributor

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

Activity

jwakely

jwakely commented on Dec 3, 2018

@jwakely
Member

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

jwakely commented on Dec 3, 2018

@jwakely
Member

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

tkoeppe

tkoeppe commented on Dec 3, 2018

@tkoeppe
Contributor

Looks like this has been broken size the first commit.

tkoeppe

tkoeppe commented on Dec 3, 2018

@tkoeppe
Contributor

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

jensmaurer commented on Dec 20, 2018

@jensmaurer
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.

added
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Dec 20, 2018
JohelEGP

JohelEGP commented on Dec 21, 2018

@JohelEGP
Contributor
jensmaurer

jensmaurer commented on May 3, 2019

@jensmaurer
Member

Duplicate of #2786.

removed
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mclow@jwakely@tkoeppe@JohelEGP@jensmaurer

        Issue actions

          Missing template declaration in [array.tuple] · Issue #2553 · cplusplus/draft