intel / intel/cpp-std-extensions

clang-tidy failure on provided example

オープン
#404 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
127
フォーク
18
平均マージ
11時間 45分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。