Consider the following code fragment, where the first line serves only as a forward declaration
class A;
followed by the definition of a new class
class B
{
vector<A> Av;
map<int, A> Am;
pair<int, A> Ap;
};
line 1 and line 2 look fine with forward declarations (which may tell me that this type of pointer use uses this type of implementation) when line 3 does not seem to compile on VS2012.
My question is, is the behavior dictated by the standard or specific to the compiler that I use?
thank
source
share