#include <iostream>#include <list> class Record{}; class RecordDer : public Record{}; template<typename Record>class List{ std::list<Record*> l_;public:int init(){return 0;};}; class ListDer : List<RecordDer>{}; using namespace std; int main() { ListDer l;l.init(); return 0;}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:15: error: ‘int List<Record>::init() [with Record = RecordDer]’ is inaccessible prog.cpp:28: error: within this context prog.cpp:28: error: ‘List<RecordDer>’ is not an accessible base of ‘ListDer’
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!