www.digitalmars.com         C & C++   DMDScript  

c++ - Private Accessibility

The following code compiles successfully with GCC GNU 4.1.1, MSVC 8.0, Comeau
4.3.x, and EDG/C++ but not with DMC 8.49.4.  Is DMC correct or can this
situation be fixed in DMC (besides by moving B to public accessibility)? 

#include <vector>

class A {
    struct B{};
    static std::vector<B> m;

std::vector<A::B> A::m;

int main(){
  return 0;

std::vector<A::B> A::m;
access.cpp(9) : Error: member 'A::B' of class 'A' is not accessible
--- errorlevel 1
Sep 22 2006