Open ranaanoop opened 1 week ago
Does removing top-level reference mean simply removing the reference. For example, in struct S{void f();};
how will the reference be removed for the object parameter of f
. Will it be that S&
is changed(transformed) to S
or something else is intended here.
I think the meaning can only be "removing references".
@frederick-vs-ja Should this be editorial then?
@frederick-vs-ja See the compiler divergences also in the following program which may be related to this issue. This is discussed in this thread and all three overloads are ill-formed.
struct C {
void j(this const C);
void j() const ; //#1: Clang:Nope while gcc and msvc:Ok
// void f(this C );
// void f(C); //#2: EDG: Nope while Clang,gcc and msvc:OK
// void k(this const C&);
// void k() const ; //#3: EDG: OK while Clang, gcc and msvc:Nope
};
Full name of submitter: Anoop Rana
Reference (section label): [basic.scope.scope]
Issue description:
The standard uses the term top-level references in basic.scope.scope but it is not clear what it means. The corresponding definition and some examples should be added just like there are example and definition for top-level cv qualifier.
As you can see in the above highlighted reference/quote from standard the term "top-level references" appears.
Suggested resolution:
Add definition for the same. Or change it(the term) and clarify what it means.