関数型へ適用された修飾子は無効なため、無視されます。
const
などの修飾子が、typedef
で定義された関数型に適用されています。
例
// C4180.cpp
// compile with: /W1 /c
typedef int FuncType(void);
// the const qualifier cannot be applied to the
// function type FuncType
const FuncType f; // C4180
このブラウザーはサポートされなくなりました。
Microsoft Edge にアップグレードすると、最新の機能、セキュリティ更新プログラム、およびテクニカル サポートを利用できます。
関数型へ適用された修飾子は無効なため、無視されます。
const
などの修飾子が、typedef
で定義された関数型に適用されています。
// C4180.cpp
// compile with: /W1 /c
typedef int FuncType(void);
// the const qualifier cannot be applied to the
// function type FuncType
const FuncType f; // C4180