template < typename T >
struct ManagerBase
{
        virtual void insert( T* );
};

template < typename T >
class ManagerInterface : public ManagerBase< T >
{
        using ManagerBase< T >::insert;
public:
        virtual bool insert( T* d, char const* ) = 0;
};

template < typename T >
class ManagerImpl : public ManagerInterface< T >
{
        using ManagerInterface< T >::insert;
public:
        bool insert( T* d, char const* );
};

struct X { };
ManagerImpl<X> m;


$ g++ -O2 -Wall -Woverloaded-virtual -c bug.cpp -o /dev/null

bug.cpp: In instantiation of 'ManagerImpl<X>':
bug.cpp:24:   instantiated from here
bug.cpp:4: error: 'void ManagerBase<T>::insert(T*) [with T = X]' is
inaccessible
bug.cpp:17: error: within this context


-- 
           Summary: 4.4 reject code accepted by 4.3 and comeau.
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39282

Reply via email to