Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8960429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:39:22+00:00 2026-06-15T15:39:22+00:00

In different places in the C++ (C++11) standard, declarations are described in terms of

  • 0

In different places in the C++ (C++11) standard, declarations are described in terms of derived-declarator-type-list. I am studying rvalue references and the use of this term is critical in that context (§8.3.2):

In a declaration T D where D has either of the forms
    & attribute-specifier-seqopt D1
    && attribute-specifier-seqopt D1
and the type of the identifier in the declaration T D1 is
“derived-declarator-type-list T,” then the type of the identifier of D
is “derived-declarator-type-list reference to T.”

Unfortunately, the category “derived-declarator-type” is never defined in the standard. (I looked through every use of the word “derived”, and in addition this is possibly confirmed here and here.)

Because “derived-declarator-type-list” is italicized, I assume it refers to a category, and not to a variable label such as T (and therefore, I disagree with Doug Gwyn’s assessment in the second link I just gave that “we could have used X instead of ‘derived-declarator-type-list‘ “).

What is the definition of derived-declarator-type in the C++11 standard?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:39:24+00:00Added an answer on June 15, 2026 at 3:39 pm

    It’s being defined right there and then. It’s a way of carrying whatever comes before T across to the next type, similar to:

    <some stuff> T
    <some stuff> reference to T
    

    It’s just whatever comes before T in the type of T D1.

    For example, if you have the declaration int& (*const * p)[30], T is int, D is & (*const * p)[30] and D1 is (*const * p)[30]. The type of T D1 is “pointer to const pointer to array of 30 int”. And so, according to the rule you quoted, the type of p is “pointer to const pointer to array of 30 reference to int”.

    Of course, this declaration is then disallowed by §3.4.2/5:

    There shall be no references to references, no arrays of references, and no pointers to references.

    I think the informal terminology of it being a derived declarator type list comes from the C standard’s definition of a derived type (similar to a compound type in C++):

    Any number of derived types can be constructed from the object, function, and
    incomplete types, as follows:

    • An array type […]
    • An structure type […]
    • An union type […]
    • An function type […]
    • An pointer type […]

    In response to the comments: It seems you’re getting confused between the type and the declarator. For example, if int* p is the declarator, then the type of p is “pointer to int”. The type is expressed as these English-like sentences.

    Example 1: int *(&p)[30]

    This is a declaration T D where (§8.3.1 Pointers):

    • T -> int
    • D -> *(&p)[3]

    D has the form:

    * attribute-specifier-seqopt cv-qualifier-seqopt D1

    where D1 is (&p)[3]. That means T D1 is of the form int (&p)[3] which has type “reference to array of 3 int” (you work this out recursively, next step using §8.3.4 Arrays and so on). Everything before the int is the derived-declarator-type-list. So we can infer that p in our original declaration has type “reference to array of 3 pointer to int“. Magic!

    Example 2: float (*(*(&e)[10])())[5]

    This is a declaration T D where (§8.3.4 Arrays):

    • T -> float
    • D -> (*(*(&e)[10])())[5]

    D is of the form:

    D1 [ constant-expressionopt ] attribute-specifier-seqopt

    where D1 is (*(*(&e)[10])()). This means T D1 is of the form float (*(*(&e)[10])()) which has type “reference to array of 10 pointer to function of () returning pointer to float” (which you work out by applying §8.3/6 and then §8.3.1 Pointers and so on). Everything before the float is the derived-declarator-type-list. So we can infer that p in our original declaration has type “reference to array of 10 pointer to function of () returning pointer to array of 5 float”. Magic again!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am sure this was done 1000 times in 1000 different places. The question
If I invoke this method with different dates, the decimal places of the result
I have two databases at two different places, both databases are same with table
I am getting following error in different places like when I am removing an
I have a system which is receiving log files from different places through http
I have image A and image B. They are located in the different places
For example, what Wordpad did when I press Ctrl+C? It places many different format
many Places in the sample code i have seen 2 different way of @synthesize
I have tried a variety of different solutions found on stack and other places
Basically, I want to change the standard RichEdit selection color in places where it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.