mardi 28 avril 2020

Getting error can not inherit constructors from indirect base in c++17 compiler

#include <iostream> 
#include <chrono>    

class A{
    public:
        A(){} // default constr

};

class B:public A{
    public:
    using A::A;
    protected:

};

class C:public B{
    public:
        using A::A; //scope resolution 

        int f1(A a);// dummy function

};

int main () 
{ 
    return 0; 
} 

// Above program is working fine with C++ and C++14 but its giving error with C++17 // why and how can it be resolved?

Aucun commentaire:

Enregistrer un commentaire