Forward declaration of objects with STL containers
问题 Consider the following code snippet, where the first line serves only as forward declaration class A; followed by defining new class class B { vector<A> Av; //line 1 map<int, A> Am; //line 2 pair<int, A> Ap; //line 3 }; line 1 and line 2 seems to be fine with the forward declaration (which may tell me that those container use pointer type of implementation) where as line 3 does not seem to compile on VS2012. My question is that behavior dictated by the standard or specific to the compiler I