N4567 § 17.6.2.2[using.headers]p3
A translation unit shall include a header only outside of any declaration or definition, and shall include
the header lexically before the first reference in that translation unit to any of the entities declared in that
header. No diagnostic is required.
string 类型是在 <string> 头文件里声明的,如果在使用 string 类型前没有包含 <string> 头文件,就是 No diagnostic is required
No diagnostic is required,完整说法应该是 ill-formed no diagnostic required。 跟 Undefined behavior 类似, ill-formed no diagnostic required 也有“后果不可预料”这样的意思