Simple exercises for learning modern C++ (C++ 20 and above).
- xmake 3.0.6.x and above
- just 1.47.x and above
- clang-format
- clang-tidy
- clangd (lsp)
$ git clone git@github.com:diniremix/cpp-examples.git$ cd cpp-examples$ vcpkg install$ just configure
# cmake --preset debug$ just build
# cmake --build --preset debug -j$ just ex EXERCISE_NAME
# cmake --build --preset debug --target EXERCISE_NAME -j
# ./build/debug/EXERCISE_NAMEcreate a new example:
$ just new EXERCISE_NAMEThen add the following line to cmake/Exercises.cmake:
add_exercise(EXERCISE_NAME)Finally, run:
$ just ex EXERCISE_NAME| O.S. | compiler |
|---|---|
| Ubuntu 24.04 | (GCC 13.3.0) |
| Fedora 44 | (GCC 16.1.1) |
| Windows 11 | (MSVC 19.44.35226 for x64) |
CPP examples is licensed under either of the following licenses, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or [http://www.apache.org/licenses/LICENSE-2.0])
- MIT license (LICENSE-MIT or [http://opensource.org/licenses/MIT])