有人可以向我解释以下编译器错误:
struct B
{
};
template <typename T>
struct A : private T
{
};
struct C : public A<B>
{
C(A<B>); // ERROR HERE
};
Run Code Online (Sandbox Code Playgroud)
指示行的错误是:
test.cpp:2:1: error: 'struct B B::B' is inaccessible
test.cpp:12:7: error: within this context
Run Code Online (Sandbox Code Playgroud)
究竟什么是难以接近的,为什么?
c++ inheritance templates compiler-errors private-inheritance