コンパイラの警告 (レベル 4) C4400

'type': この型での const/volatile 修飾子はサポートされていません

constvolatile 修飾子は、共通言語ランタイム型の変数では使用できません。

次の例では C4400 が生成されます。

// C4400.cpp
// compile with: /clr /W4
// C4401 expected
using namespace System;
#pragma warning (disable : 4101)
int main() {
   const String^ str;   // C4400
   volatile String^ str2;   // C4400
}