Kompilatorfel C3213

basklassen "base_type" är mindre tillgänglig än "derived_type"

Anmärkningar

En typ som visas från en sammansättning måste använda offentligt synliga basklasser.

Example

I följande exempel genereras C3213:

// C3213.cpp
// compile with: /clr
private ref struct privateG {
public:
   int i;
};

public ref struct publicG {
public:
   int i;
};

public ref struct V : public privateG {   // C3213
public:
   int j;
};

public ref struct W: public publicG {   // OK
public:
   int j;
};