AUTOSAR C++14 Rule M7-3-6
Using-directives and using-declarations (excluding class scope or function scope using-declarations) shall not be used in header files
説明
ルール定義
using-directives and using-declarations (excluding class scope or function scope using-declarations) shall not be used in header files.
根拠
using 命令または宣言がヘッダー ファイル内に存在する場合は、ヘッダーのインクルード順序が最終的なプログラム結果に影響する可能性があります。プログラムの動作がヘッダーのインクルード順序に依存しないことを確認することをお勧めします。
Polyspace 実装
チェッカーは、ヘッダー ファイル内の using 命令または宣言にフラグを設定します。
トラブルシューティング
ルール違反が想定されるものの、Polyspace® から報告されない場合は、コーディング規約違反が想定どおりに表示されない理由の診断を参照してください。
例
チェック情報
| グループ: 宣言 |
| カテゴリ: Required、Automated |
バージョン履歴
R2019a で導入