http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57684
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- The standard says it is undefined to instantiate any std template with incomplete types (with exceptions for shared_ptr and unique_ptr and maybe a few others). As an extension libstdc++ allows all containers to be instantiated with incomplete types, except the unordered_xxx ones.