boostorg / boostorg/program_options
Compilation failure with Clang 17 and `-std=cpp23`
- Vorherrschende Sprache
- C++
- Sterne
- 136
- Forks
- 117
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Summary
Including `` causes a compilation failure when compiling with clang 17.0.6 and GNU stdlibc++ 14 with `-std=gnu++23`
## Steps to reproduce
Install boost (a conanfile is provided) and extract the attached archive.
[boost-po-test.tar.gz](https://github.com/user-attachments/files/15748101/boost-po-test.tar.gz)
```
tar -xf boost-po-test-tgz
cd boost-po-test/
cmake --preset default
cmake --build build/default
```
## Expected result
compilation is successful
## Actual result
compilation fails with
```
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.1.1/../../../../include/c++/14.1.1/tuple:956:36: error: no matching function for call to 'get'
956 | return __convertible(std::declval<_UTuple>()))...>();
```
## Workaround
Edit the `CMakeLists.txt` file and change
```
set(CMAKE_CXX_STANDARD 23)
```
to
```
set(CMAKE_CXX_STANDARD 20)
```
and recompile.
## System Info
Boost 1.85.0 (conan)
Arch Linux
Clang 17.0.6
GCC 14.1.1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Entpacke das angehängte Archiv und führe das dokumentierte cmake preset mit Clang 17, GCC 14 und C++23 aus, um den Fehler aus boost/program_options.hpp zu reproduzieren. Vergleiche den Build mit C++20 und untersuche anschließend die an der gemeldeten tuple/get-Diagnose beteiligten program_options-Header. Als erledigt gilt die Aufgabe, wenn die Reproduktion unter der gemeldeten C++23-Konfiguration erfolgreich kompiliert, ohne den Workaround zu benötigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cmake, cpp
- Bereich
- build-system, compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100