Can someone please explain why the marked line does not compile? It seems to me that if B2 and D compile, B1 should too.
class A1 {
protected:
A1(int){}
};
class B1 : private A1 {
public:
using A1::A1;
};
class A2 {
protected:
A2(int){}
};
class B2 : private A2 {
public:
B2(int i) : A2(i) {}
};
class C {
protected:
void f(int) {}
};
class D : private C {
public:
using C::f;
};
int main() {
// B1 b1(1); // error: calling a protected constructor of class 'A1'
B2 b2(1);
D d;
d.f(1);
}