This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22136] [4.1 regression] Rejects old-style using declaration
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2005 04:30:38 -0000
- Subject: [Bug c++/22136] [4.1 regression] Rejects old-style using declaration
- References: <bug-22136-102@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-11-11 04:30 -------
The difference between having the use and the no use case is that we get
a nondependent name for naming the struct B which is just wrong.
Hmm, I think I found related rejects valid for before 4.1.0:
struct B {
void foo();
};
namespace a
{
struct B {
};
}
template <typename T> class I : public a::B {};
template<> class I<int> : public B {};
template <typename T> class D : private I<T> {
I<T>::B::foo;
};
D<int> i;
--------
This is not a regression though.
The error we get:
t.cc: In instantiation of `D<int>':
t.cc:18: instantiated from here
t.cc:14: error: type `a::B' is not a base type for type `D<int>'
Now to figure out why we are getting a::B instead of D<T>::B like we get in the
using case.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22136