c++ - There seems to be a contradiction in §12.3.2/1 in the C++11 Standard -


c++11 standard §12.3.2/1 (emphasis mine):

a member function of class x having no parameters name of form

conversion-function-id:

operator conversion-type-id

conversion-type-id:

type-specifier-seq conversion-declarator

conversion-declarator:

ptr-operator conversion-declarator

specifies conversion x type specified conversion-type-id. such functions called conversion functions. no return type can specified. if conversion function member function, type of conversion function (8.3.5) “function taking no parameter returning conversion-type-id”.

is conversion function member function, or there cases not true?

the clause "if conversion function member function," added working draft in n2798 part of concepts wording per n2773 proposed wording concepts. n2798 12.3.2/1 reads (i'll use bold show additions, , strikeout show removals):

1 member function of class x having no parameters, or associated function of concept sole parameter of type x, name of form

conversion-function-id:

operator conversion-type-id

conversion-type-id:

type-specifier-seq attribute-specifieropt conversion-declaratoropt

conversion-declarator:

ptr-operator conversion-declaratoropt

specifies conversion x type specified conversion-type-id. such member functions called conversion functions. classes, enumerations, , typedef-names shall not declared in type-specifier-seq. neither parameter types nor no return type can specified. if conversion function member function, tthe type of a the conversion function (8.3.5) “function taking no parameter returning conversion-type-id; if conversion function associated function, type of conversion function “function taking parameter of type x returning conversion-type-id. conversion function never used convert ...

the concepts wording removed in draft n2960. "if conversion function member function," should have been removed @ time since vestigal. pertinent portion of n2960 §12.3.2/1:

1 member function of class x having no parameters, or associated function of concept sole parameter of type x, name of form

conversion-function-id:

operator conversion-type-id

conversion-type-id:

type-specifier-seq attribute-specifieropt conversion-declaratoropt

conversion-declarator:

ptr-operator conversion-declaratoropt

specifies conversion x type specified conversion-type-id. such functions called conversion functions. no return type can specified. if conversion function member function, type of conversion function (8.3.5) “function taking no parameter returning conversion-type-id; if conversion function associated function, type of conversion function “function taking parameter of type x returning conversion-type-id. ...


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -