This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/22136] [4.1 regression] Rejects old-style using declaration



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]