www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.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)? 
Thanks.

#include <vector>

class A {
  private:
    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