|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++ - A couple of using-declaration bugs
Hi, I've found a couple of bugs with the latest version (8.50) of DMC. They
can be reproduced as follows:
First, DMC doesn't allow using-declarations to modify the access rights of
member function templates:
class base
{
protected:
template <typename T>
void f(T);
};
class derived : base
{
public:
using base::f;
};
void g()
{
derived d;
d.f(5); // Error: member 'base::f' of class 'derived' is not accessible
}
Second, the compiler fails to parse the following construct:
template <typename T>
class base
{
protected:
void f();
};
class derived : base<int>
{
public:
using base<int>::f; // Error: using-declaration cannot name template-id
'base'
};
The latter bug is easily worked-around by using a typedef, however.
Thanks for your time, and for your compiler! :-)
Feb 07 2008
|