U
Uenal Mutlu
The documentation of Microsoft's latest C++ compiler version
(it's called ".NET 2005" or something that) says:
// QUOTE START
Summary of Compile-Time Breaking Changes
This topic summarizes the compile-time errors and
warnings that will now be issued on code that compiled
without errors or warnings prior to Visual C++ 2003.
However, some conformance-related, compile-time breaking
changes were introduced in Visual C++ 2005.
A protected member (n) can only be accessed through a
member function of a class (B) that inherits from the
class (A) of which it (n) is a member (C2247).
' identifier ' not accessible because ' class ' uses ' specifier ' to inherit
from ' class '
identifier is inherited from a class declared with private or protected access.
The following sample generates C2247:
// C2247.cpp
class A {
public:
int i;
};
class B : private A {}; // B inherits a private A
class C : public B {} c; // so even though C's B is public
int j = c.i; // C2247, i not accessible
// QUOTE END
So, are they telling the C++ programmers who have to use their product
that their new compiler now detects this error? And that all their old
versions of the last maybe 10 years did not detect this basic error?
(it's called ".NET 2005" or something that) says:
// QUOTE START
Summary of Compile-Time Breaking Changes
This topic summarizes the compile-time errors and
warnings that will now be issued on code that compiled
without errors or warnings prior to Visual C++ 2003.
However, some conformance-related, compile-time breaking
changes were introduced in Visual C++ 2005.
A protected member (n) can only be accessed through a
member function of a class (B) that inherits from the
class (A) of which it (n) is a member (C2247).
' identifier ' not accessible because ' class ' uses ' specifier ' to inherit
from ' class '
identifier is inherited from a class declared with private or protected access.
The following sample generates C2247:
// C2247.cpp
class A {
public:
int i;
};
class B : private A {}; // B inherits a private A
class C : public B {} c; // so even though C's B is public
int j = c.i; // C2247, i not accessible
// QUOTE END
So, are they telling the C++ programmers who have to use their product
that their new compiler now detects this error? And that all their old
versions of the last maybe 10 years did not detect this basic error?