https://github.com/berndporr/stdformat
Small program checking if std::format of C++20 is available with gcc/cmake
https://github.com/berndporr/stdformat
clang cmake cpp cpp20 gcc
Last synced: about 1 year ago
JSON representation
Small program checking if std::format of C++20 is available with gcc/cmake
- Host: GitHub
- URL: https://github.com/berndporr/stdformat
- Owner: berndporr
- License: gpl-3.0
- Created: 2025-05-11T21:01:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-07T08:46:51.000Z (about 1 year ago)
- Last Synced: 2025-07-07T09:43:11.466Z (about 1 year ago)
- Topics: clang, cmake, cpp, cpp20, gcc
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stdformat
A small program testing `std::format` of C++20. It's basically
a test which compilers can actually compile C++20 sources at the moment
(12 May 2025).
Turns out that gcc under Debian bookworm can't compile
C++20 but it has clang-19 as an option which can do it
but only if it uses also the clang libstdc++.
Any later Debian version is doing fine. Also Ubuntu Noble
has no issues.
## Prerequisites
- clang: `apt install clang-18 libc++-18-dev` or `clang-19 libc++-19-dev`
- gcc: `apt install libstdc++-14-dev g++-13` or `g++-14`
## Building
- gcc:
```
cmake .
make
```
- clang:
There are two shell scripts `build-with-clang18.sh` (ubuntu Noble) or `build-with-clang19.sh` (Debian Bookworm) for clang 18
or clang 19 respectively.
## Credits
Based on a discussion on stackoverflow.