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
Some rules are omitted in [dcl.ptr], [dcl.ref], [dcl.mptr], [dcl.array], [dcl.fct] #4712
Comments
@jensmaurer Could you please take a look at this issue? I think the current draft totally lacks to define these special types. Simultaneously, these special types are used to form some normative rules somewhere in the standard. For instance
As aforementioned in the issue, the function type is not clearly defined. Similar issues are scattered in the standard. |
[basic.compound] claims to define these special types, although the italics in p1 is missing "... type" in each case. I would not object to moving the normative definition to [dcl.meaning] where we define the quoted-type-name-string in each case, and use that notation in [basic.compound] to streamline the auxiliary definitions there. For example, we could say
|
Agreed. Since each clause in [dcl.meaning] has introduced the relevant type for the In addition, give a normative definition of which declaration would define a reference or another entity is also significant. For example, the following rule refers such the use
Since a declaration of a reference hasn't a normative definition, it's what I said in the above comment, we should define it with the help of using the special type, and the object declaration that has been defined in the standard to clarify the concept. Simultaneously, it will also solve the non-explicit defined concept that a typedef-declaration of |
How about if "derived-declarator-type-list" is not empty(e.g, "pointer to" )? Is it, in either case, a function type? It obviously not. I think it should be:
The following rule is used to state what kind of declaration declares a function, It emphasizes that a typedef declaration with function type does not declare a function, which is a lack in the standard.
It should have the similar modification for [dcl.ptr], [dcl.ref], [dcl.mptr], [dcl.array].
[dcl.ptr]
[dcl.ref]
[dcl.mptr]
[dcl.array]
The above modification together with the following rule simultaneously clarifies that a typedef declaration with a reference type or an object type does not declare a variable, for which I don't find any strong evidence in the current draft; Since there is no rule in the current draft states what is the declaration of a reference or an object.
The text was updated successfully, but these errors were encountered: