https://github.com/scivision/cpp23-examples
Example C++23 and C++20 syntax and tests of compilers and CMake
https://github.com/scivision/cpp23-examples
cpp23
Last synced: 3 months ago
JSON representation
Example C++23 and C++20 syntax and tests of compilers and CMake
- Host: GitHub
- URL: https://github.com/scivision/cpp23-examples
- Owner: scivision
- License: mit
- Created: 2019-06-20T02:27:42.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T23:04:49.000Z (9 months ago)
- Last Synced: 2025-05-25T23:05:07.704Z (8 months ago)
- Topics: cpp23
- Language: C++
- Homepage:
- Size: 227 KB
- Stars: 107
- Watchers: 6
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C++23 and C++20 Examples
[](https://github.com/scivision/Cpp23-examples/actions/workflows/cmake.yml)
Examples of using CMake with
[C++26](https://en.cppreference.com/w/cpp/26),
C++23, and C++20 standard syntax.
This is useful for testing of compilers and build systems--already several bugs have been so detected.
We typically use
[feature testing macros](https://en.cppreference.com/w/cpp/feature_test)
to detect a feature, but some features require a small compile and link test.
[C++ execution policy benchmark](./execution_policy/Readme.md)
## Troubleshooting
If the cstdlib check fails on macOS, this can be a symptom of
[Xcode being incompatible](https://www.scivision.dev/cmake-macos-environment-xcode/)
with the compiler.
Try setting environment variable `SDKROOT` to the previous Xcode SDK path that worked previous to the Xcode upgrade that broke.
## Related projects
* [C23 examples](https://github.com/scivision/C23-examples)
* [C++17 filesystem application](https://github.com/scivision/fortran-filesystem)
* [C++ modules](https://github.com/scivision/CppModules)
## References
* [Each new C++20 feature with example in one page](https://oleksandrkvl.github.io/2021/04/02/cpp-20-overview.html)