intel / intel/cpp-std-extensions

clang-tidy failure on provided example

Aperta
#404 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
127
Fork
18
Merge medio
11h 45m
PR unite (30g)
13

Descrizione

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).

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.