cppcheck 为 'using' 语句报告 "Redundant code: Found a statement that begins with numeric constant"

cppcheck reports "Redundant code: Found a statement that begins with numeric constant" for a 'using' statement

我知道这不是很多上下文,我有这行:

using GridType = Grid<boost::optional<float>, 2>;

cppcheck 说:

Redundant code: Found a statement that begins with numeric constant.

我会想"false positive",但通常这些分析工具都比我聪明,所以我想看看有没有人能想到为什么这样的语句可以被分析器解释成那样?

我在 Ubuntu 系统上使用 cppcheck 1.61。

cppcheck 主要基于模式匹配,有时不太聪明/很肤浅。它 确实 找到了一堆好东西,但也有 很多 误报。我会说这是一个误报,cppchecks 简单的头脑感到困惑。

还有; 1.61 版本有点旧。你有没有测试过最新的1.74,看看它在这里是否更聪明? (如果它不在您的发行版存储库中,则从源代码构建非常简单)