共用方式為


編譯器警告 (層級 1) C4384

#pragma 'pragma_name' 應僅在全域範圍使用

在不同的範圍中找到必須套用於全域範圍的 pragma 指示詞。

警告適用於下列 pragma 指示詞:

範例

下列範例會產生 C4384。

// C4384.cpp
// compile with: /c /W1
namespace n {
   #pragma make_public(N::C)   // C4384
   namespace N {
      class C {};
   }
}