intel / intel/cpp-std-extensions

clang-tidy failure on provided example

Ouverte
#404 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
127
Forks
18
Merge moyen
11 h 45 min
PR mergées (30 j)
13

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cpp
Domaine
tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.