Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
261 views
in Technique[技术] by (71.8m points)

c++ - How to read `function type` in [dcl.fct] section

The normative definition for function type is described as
[dcl.fct#3]

A type of either form is a function type.

My reading for these forms are

The type of the declarator-id in D is:

  1. derived-declarator-type-list noexcept opt function of parameter-type-list cv-qualifier-seq opt ref-qualifier opt returning T
  2. derived-declarator-type-list noexcept opt function of parameter-type-list cv-qualifier-seq opt ref-qualifier opt returning U

If I understand correctly, Only the derived-declarator-type-list is empty will the type of the declarator-id in D be the function type.

However, the relevant rule is not clear here. Such as, if derived-declarator-type-list is pointer to, the type of the declarator-id in D should be called a pointer type, Isn't it? So, I wonder Is it vague here for the definition of function type? If I misunderstand the relevant wording, please point out how to read the wording?

question from:https://stackoverflow.com/questions/66045782/how-to-read-function-type-in-dcl-fct-section

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...