Bug 96138 - DR 458: Hiding of member template parameters by other members
Summary: DR 458: Hiding of member template parameters by other members
Status: RESOLVED DUPLICATE of bug 87841
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks: c++-core-issues
  Show dependency treegraph
 
Reported: 2020-07-09 19:06 UTC by Marek Polacek
Modified: 2021-08-23 08:38 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Polacek 2020-07-09 19:06:31 UTC
This test from [temp.local] should now compile:

template<class T> struct A {
  struct B { /* ... */ };
  typedef void C;
  void f();
  template<class U> void g(U);
};

template<class B> void A<B>::f() {
  B b;              // A's B, not the template parameter
}

template<class B> template<class C> void A<B>::g(C) {
  B b;              // A's B, not the template parameter
  C c;              // the template parameter C, not A's C
}

but it seems we choose A::C.
Comment 1 Andrew Pinski 2021-08-23 08:38:25 UTC
This is a dup of bug 87841

*** This bug has been marked as a duplicate of bug 87841 ***