Consider the following code snippet, where the first line serves only as forward declaration
class A;
followed by defining new class
Nope, this behavior is expected and standard.
The rational is that std::pair actually forms a struct, therefore both its types must be complete before instantiation.