https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
--- Comment #6 from jim x ---
struct A{
struct Name{};
void Name(){}
};
struct B:A{
using A::Name; //#1
};
int main() {
struct B::Name d;
}
According to [basic.lookup#general-4], the lookup set occurs at `#1` would
discard the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
--- Comment #5 from Jonathan Wakely ---
If that's what "ignored" means here then I think a note would be helpful.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
--- Comment #4 from jim x ---
[namespace.udecl#1] says
> Each using-declarator in a using-declaration names the set of declarations
> found by lookup ([basic.lookup.qual]) for the using-declarator, except that
> class and enumeration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
--- Comment #3 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #2)
> he using-declaration finds a class and a function, and ignores the class,
See [namepace.udecl] p1 and [basic.lookup.general] p4.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
--- Comment #2 from Jonathan Wakely ---
I think GCC is correct here. The using-declaration finds a class and a
function, and ignores the class, which means it only redeclares the function as
public. That means B::C is indeed referring to a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99160
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|