intel / intel/cpp-std-extensions

clang-tidy failure on provided example

未關閉
#404 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
127
分支
18
平均合併
11 小時 45 分鐘
30 天內合併 PR
13

描述

The current main will fail clang-tidy (but _pass_ clang and gcc compilation) on a simple example from the docs:

```c++
#include
int main() {
auto s = stdx::ct_format<"Hello {} {}">(CX_VALUE(42), 17);
}
```

The errors are:

```
stdx/ct_format.hpp:348:28: error: constexpr variable 'sz' must be initialized by a constant expression [clang-diagnostic-error]
stdx/ct_format.hpp:349:34: error: no matching function for call to 'perform_format' [clang-diagnostic-error]
```

I believe the source of this problem is a commit in the fmt library as described in [this issue](https://github.com/intel/compile-time-init-build/issues/951).

貢獻指南

開啟貢獻指南

研究方向

Reproduce the documented example with clang-tidy and inspect stdx/ct_format.hpp around lines 348-349, where the constexpr variable and perform_format call fail. Compare the relevant fmt-library change described in the linked upstream issue; done means the example passes clang-tidy while retaining successful clang and gcc compilation.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
tooling
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。