The following example code produces the compiler error "c:/temp/test.cpp(12): error #453: protected function "C1::C1(int)" (declared at line 4) is not accessible through a "C1" pointer or object" using command line "icpc.exe -std=c++11 c:\temp\test.cpp".
class C1 { protected: C1(int a) { } }; class C2 : public C1 { public: C2() : C1{2} { } };
It compiles if we change initializer syntax in line
C2() : C1{2}
to constructor syntax
C2() : C1(2)
Is this a bug? Thank you for clarification in advance.