RE: Why is this C++ code incorrect?

2005-12-20 Thread Jiutao Nie
passing of compilation for original base class violates the standard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Blandy Sent: Wednesday, December 21, 2005 1:25 AM To: Nathan Sidwell Cc: Jiutao Nie; gcc@gcc.gnu.org Subject: Re: Why is this C++ code inco

Why is this C++ code incorrect?

2005-12-20 Thread Jiutao Nie
Hi, Compiling the following code with g++ will report error:`static void A::operator delete(void*)' is protected. It's correct If B is derived from A without "virtual". Why does the "new B" expression need to check the delete operator's accessibility when B is virutally derived from A? class