In "Codependent types with unordered_map" it was observed that
std::unordered_map<Key, Value> has a type dependency on Value in libstdc++ (which is unexpected) and has no type dependency on Value in libc++ and MSVC.
In general, does the ISO C++ specification talk about the type dependencies of containers at all? If so could you point me to relevant parts?
Type dependency: I'm not sure if there is a formal definition of type dependency in the ISO C++ spec, but for the purposes of this post, let us say a type A has type dependency on type B if A cannot be compiled with the forward declaration of B alone. Example:
struct Val; // forward declaration of Val
struct Container {
Val v;
}; // Compile error; Type Val is incomplete. Container has a type dependency on Val
struct Val; // forward declaration of Val
struct Container2 {
Val *v;
}; // Compiles. Container2 does not have type dependency on Val