Update: Using C++26 with contracts enabled
This commit is contained in:
@@ -14,12 +14,15 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
option(COURSE_BUILD_TESTS "Build Google Test exercise targets" ON)
|
||||
option(COURSE_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
|
||||
option(COURSE_ENABLE_CONTRACTS "Enable C++26 contracts on GCC 16+" ON)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(CourseOptions)
|
||||
include(CourseExercise)
|
||||
|
||||
add_subdirectory(support)
|
||||
|
||||
if(COURSE_BUILD_TESTS)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
|
||||
@@ -5,21 +5,33 @@ A hands-on C++ course with **56 Google Test exercises** organized into **14 modu
|
||||
## Requirements
|
||||
|
||||
- **CMake** 3.20+
|
||||
- **C++ compiler** with C++23 support for later modules
|
||||
- Apple Clang 15+, GCC 13+, or MSVC 19.34+ recommended
|
||||
- **C++26-capable compiler**
|
||||
- **GCC 16+** recommended (required for `pre`/`post` contracts)
|
||||
- Apple Clang can build most exercises but **does not support contracts yet**
|
||||
- **CLion** (recommended) or any CMake-aware IDE
|
||||
- Internet access on first configure (Google Test is fetched automatically)
|
||||
|
||||
## Quick Start (CLion)
|
||||
|
||||
1. Open this folder in CLion (`File → Open…`).
|
||||
2. CLion detects `CMakeLists.txt` and configures automatically.
|
||||
3. Pick an exercise target (e.g. `01_fundamentals_hello_world`) in the run configuration dropdown.
|
||||
4. Implement the TODOs in the matching `src/*.cpp` file.
|
||||
5. Run the test target until all assertions pass.
|
||||
2. Select the **`gcc26-contracts`** CMake profile (see `CMakePresets.json`).
|
||||
3. Reload CMake when prompted.
|
||||
4. Pick an exercise target (e.g. `02_control_flow_loops`) in the run configuration dropdown.
|
||||
5. Implement the TODOs in the matching `src/*.cpp` file.
|
||||
6. Run the test target until all assertions pass.
|
||||
|
||||
## Quick Start (Terminal)
|
||||
|
||||
**Recommended — GCC 16 with contracts:**
|
||||
|
||||
```bash
|
||||
cmake --preset gcc26-contracts
|
||||
cmake --build build-gcc26
|
||||
ctest --test-dir build-gcc26 --output-on-failure
|
||||
```
|
||||
|
||||
**Default toolchain:**
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build
|
||||
@@ -29,8 +41,8 @@ ctest --test-dir build --output-on-failure
|
||||
Run a single exercise:
|
||||
|
||||
```bash
|
||||
cmake --build build --target 01_fundamentals_hello_world
|
||||
./build/modules/01_fundamentals/01_fundamentals_hello_world
|
||||
cmake --build build-gcc26 --target 02_control_flow_loops
|
||||
./build-gcc26/modules/02_control_flow/02_control_flow_loops
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
@@ -40,7 +52,10 @@ cppc/
|
||||
├── CMakeLists.txt # Root project + Google Test
|
||||
├── cmake/
|
||||
│ ├── CourseExercise.cmake # add_course_exercise() helper
|
||||
│ └── CourseOptions.cmake # Warnings and standards
|
||||
│ ├── CourseOptions.cmake # Warnings, standards, contracts
|
||||
│ └── toolchains/gcc-16.cmake # Optional GCC 16 toolchain file
|
||||
├── CMakePresets.json # CLion/CMake presets (gcc26-contracts)
|
||||
├── support/ # Shared contract violation handler
|
||||
└── modules/
|
||||
├── 01_fundamentals/ # Types, operators, I/O
|
||||
├── 02_control_flow/ # if, switch, loops
|
||||
@@ -75,22 +90,22 @@ Each module contains:
|
||||
|
||||
## Course Map
|
||||
|
||||
| Module | Topic | Exercises | C++ Standard |
|
||||
|--------|-------|-----------|--------------|
|
||||
| 01 | Fundamentals | 4 | C++17 |
|
||||
| 02 | Control flow | 4 | C++17 |
|
||||
| 03 | Functions | 4 | C++17 |
|
||||
| 04 | Arrays & strings | 4 | C++17 |
|
||||
| 05 | Pointers & references | 4 | C++17 |
|
||||
| 06 | OOP basics | 4 | C++17 |
|
||||
| 07 | STL containers | 4 | C++17 |
|
||||
| 08 | STL algorithms | 4 | C++17 |
|
||||
| 09 | C++11 | 4 | C++11 |
|
||||
| 10 | C++14 | 4 | C++14 |
|
||||
| 11 | C++17 | 4 | C++17 |
|
||||
| 12 | C++20 | 4 | C++20 |
|
||||
| 13 | C++23 | 4 | C++23 |
|
||||
| 14 | C++26 frontier | 4 | C++23+ |
|
||||
| Module | Topic | Exercises | Build standard |
|
||||
|--------|-------|-----------|----------------|
|
||||
| 01 | Fundamentals | 4 | C++26 |
|
||||
| 02 | Control flow | 4 | C++26 |
|
||||
| 03 | Functions | 4 | C++26 |
|
||||
| 04 | Arrays & strings | 4 | C++26 |
|
||||
| 05 | Pointers & references | 4 | C++26 |
|
||||
| 06 | OOP basics | 4 | C++26 |
|
||||
| 07 | STL containers | 4 | C++26 |
|
||||
| 08 | STL algorithms | 4 | C++26 |
|
||||
| 09 | C++11 features | 4 | C++26 |
|
||||
| 10 | C++14 features | 4 | C++26 |
|
||||
| 11 | C++17 features | 4 | C++26 |
|
||||
| 12 | C++20 features | 4 | C++26 |
|
||||
| 13 | C++23 features | 4 | C++26 |
|
||||
| 14 | C++26 frontier | 4 | C++26 |
|
||||
|
||||
## CMake Options
|
||||
|
||||
@@ -98,11 +113,38 @@ Each module contains:
|
||||
|--------|---------|-------------|
|
||||
| `COURSE_BUILD_TESTS` | ON | Build Google Test exercise targets |
|
||||
| `COURSE_WARNINGS_AS_ERRORS` | OFF | Treat warnings as errors |
|
||||
| `COURSE_ENABLE_CONTRACTS` | ON | Enable `-fcontracts` on GCC 16+ targets |
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DCOURSE_WARNINGS_AS_ERRORS=ON
|
||||
cmake --preset gcc26-contracts -DCOURSE_WARNINGS_AS_ERRORS=ON
|
||||
```
|
||||
|
||||
## C++26 Contracts
|
||||
|
||||
Exercises compile as **C++26**. On **GCC 16+**, the build enables:
|
||||
|
||||
- `-fcontracts`
|
||||
- `-fcontract-semantic=enforce`
|
||||
- A shared `handle_contract_violation` handler in `support/contract_handler.cpp`
|
||||
|
||||
Use `#include <contracts>` and syntax like:
|
||||
|
||||
```cpp
|
||||
auto factorial(int n) -> long long
|
||||
pre(n >= 0)
|
||||
{
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
**Apple Clang does not support contracts yet.** Use the `gcc26-contracts` preset in CLion or:
|
||||
|
||||
```bash
|
||||
cmake -S . -B build-gcc26 \
|
||||
-DCMAKE_CXX_COMPILER=/opt/homebrew/bin/g++-16 \
|
||||
-DCOURSE_ENABLE_CONTRACTS=ON
|
||||
```
|
||||
|
||||
## CLion Tips
|
||||
@@ -114,6 +156,6 @@ cmake -S . -B build -DCOURSE_WARNINGS_AS_ERRORS=ON
|
||||
|
||||
## Notes on C++26
|
||||
|
||||
C++26 is still in active standardization. Module 14 focuses on techniques and library directions that remain relevant—deep `constexpr`, monadic `expected`, ranges pipelines, and `std::formatter`—using C++23 as the practical baseline.
|
||||
All exercises now build with **C++26**. Module READMEs still describe the language feature each exercise teaches (C++11, C++17, etc.), but the toolchain baseline is unified at C++26 for a consistent modern environment.
|
||||
|
||||
Happy learning!
|
||||
|
||||
@@ -21,7 +21,7 @@ function(add_course_exercise)
|
||||
endif()
|
||||
|
||||
if(NOT EXERCISE_STANDARD)
|
||||
set(EXERCISE_STANDARD 23)
|
||||
set(EXERCISE_STANDARD 26)
|
||||
endif()
|
||||
|
||||
set(target_name "${EXERCISE_MODULE}_${EXERCISE_NAME}")
|
||||
@@ -33,6 +33,11 @@ function(add_course_exercise)
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
)
|
||||
course_set_cxx_standard(${target_name} ${EXERCISE_STANDARD})
|
||||
|
||||
if(EXERCISE_STANDARD GREATER_EQUAL 26)
|
||||
course_enable_contracts(${target_name})
|
||||
endif()
|
||||
|
||||
course_apply_warnings(${target_name})
|
||||
|
||||
if(COURSE_BUILD_TESTS)
|
||||
|
||||
@@ -23,3 +23,22 @@ endfunction()
|
||||
function(course_set_cxx_standard target_name standard)
|
||||
target_compile_features(${target_name} PRIVATE cxx_std_${standard})
|
||||
endfunction()
|
||||
|
||||
function(course_enable_contracts target_name)
|
||||
if(NOT COURSE_ENABLE_CONTRACTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16))
|
||||
return()
|
||||
endif()
|
||||
|
||||
target_compile_options(
|
||||
${target_name}
|
||||
PRIVATE
|
||||
-fcontracts
|
||||
-fcontract-evaluation-semantic=enforce
|
||||
)
|
||||
target_link_options(${target_name} PRIVATE -fcontracts)
|
||||
target_link_libraries(${target_name} PRIVATE course_contract_support)
|
||||
endfunction()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
add_course_exercise(
|
||||
NAME hello_world
|
||||
MODULE 01_fundamentals
|
||||
STANDARD 17
|
||||
STANDARD 26
|
||||
SOURCES
|
||||
src/hello_world.cpp
|
||||
test/hello_world_test.cpp
|
||||
@@ -10,7 +10,7 @@ add_course_exercise(
|
||||
add_course_exercise(
|
||||
NAME variables_and_types
|
||||
MODULE 01_fundamentals
|
||||
STANDARD 17
|
||||
STANDARD 26
|
||||
SOURCES
|
||||
src/variables_and_types.cpp
|
||||
test/variables_and_types_test.cpp
|
||||
@@ -19,7 +19,7 @@ add_course_exercise(
|
||||
add_course_exercise(
|
||||
NAME operators
|
||||
MODULE 01_fundamentals
|
||||
STANDARD 17
|
||||
STANDARD 26
|
||||
SOURCES
|
||||
src/operators.cpp
|
||||
test/operators_test.cpp
|
||||
@@ -28,7 +28,7 @@ add_course_exercise(
|
||||
add_course_exercise(
|
||||
NAME basic_io
|
||||
MODULE 01_fundamentals
|
||||
STANDARD 17
|
||||
STANDARD 26
|
||||
SOURCES
|
||||
src/basic_io.cpp
|
||||
test/basic_io_test.cpp
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME conditionals MODULE 02_control_flow STANDARD 17
|
||||
add_course_exercise(NAME conditionals MODULE 02_control_flow STANDARD 26
|
||||
SOURCES src/conditionals.cpp test/conditionals_test.cpp)
|
||||
add_course_exercise(NAME switch_statements MODULE 02_control_flow STANDARD 17
|
||||
add_course_exercise(NAME switch_statements MODULE 02_control_flow STANDARD 26
|
||||
SOURCES src/switch_statements.cpp test/switch_statements_test.cpp)
|
||||
add_course_exercise(NAME loops MODULE 02_control_flow STANDARD 17
|
||||
add_course_exercise(NAME loops MODULE 02_control_flow STANDARD 26
|
||||
SOURCES src/loops.cpp test/loops_test.cpp)
|
||||
add_course_exercise(NAME break_continue MODULE 02_control_flow STANDARD 17
|
||||
add_course_exercise(NAME break_continue MODULE 02_control_flow STANDARD 26
|
||||
SOURCES src/break_continue.cpp test/break_continue_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME function_basics MODULE 03_functions STANDARD 17
|
||||
add_course_exercise(NAME function_basics MODULE 03_functions STANDARD 26
|
||||
SOURCES src/function_basics.cpp test/function_basics_test.cpp)
|
||||
add_course_exercise(NAME overloading MODULE 03_functions STANDARD 17
|
||||
add_course_exercise(NAME overloading MODULE 03_functions STANDARD 26
|
||||
SOURCES src/overloading.cpp test/overloading_test.cpp)
|
||||
add_course_exercise(NAME default_parameters MODULE 03_functions STANDARD 17
|
||||
add_course_exercise(NAME default_parameters MODULE 03_functions STANDARD 26
|
||||
SOURCES src/default_parameters.cpp test/default_parameters_test.cpp)
|
||||
add_course_exercise(NAME recursion MODULE 03_functions STANDARD 17
|
||||
add_course_exercise(NAME recursion MODULE 03_functions STANDARD 26
|
||||
SOURCES src/recursion.cpp test/recursion_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME c_arrays MODULE 04_arrays_and_strings STANDARD 17
|
||||
add_course_exercise(NAME c_arrays MODULE 04_arrays_and_strings STANDARD 26
|
||||
SOURCES src/c_arrays.cpp test/c_arrays_test.cpp)
|
||||
add_course_exercise(NAME std_string MODULE 04_arrays_and_strings STANDARD 17
|
||||
add_course_exercise(NAME std_string MODULE 04_arrays_and_strings STANDARD 26
|
||||
SOURCES src/std_string.cpp test/std_string_test.cpp)
|
||||
add_course_exercise(NAME std_vector MODULE 04_arrays_and_strings STANDARD 17
|
||||
add_course_exercise(NAME std_vector MODULE 04_arrays_and_strings STANDARD 26
|
||||
SOURCES src/std_vector.cpp test/std_vector_test.cpp)
|
||||
add_course_exercise(NAME multidimensional MODULE 04_arrays_and_strings STANDARD 17
|
||||
add_course_exercise(NAME multidimensional MODULE 04_arrays_and_strings STANDARD 26
|
||||
SOURCES src/multidimensional.cpp test/multidimensional_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME pointer_basics MODULE 05_pointers_and_references STANDARD 17
|
||||
add_course_exercise(NAME pointer_basics MODULE 05_pointers_and_references STANDARD 26
|
||||
SOURCES src/pointer_basics.cpp test/pointer_basics_test.cpp)
|
||||
add_course_exercise(NAME references MODULE 05_pointers_and_references STANDARD 17
|
||||
add_course_exercise(NAME references MODULE 05_pointers_and_references STANDARD 26
|
||||
SOURCES src/references.cpp test/references_test.cpp)
|
||||
add_course_exercise(NAME pointer_arithmetic MODULE 05_pointers_and_references STANDARD 17
|
||||
add_course_exercise(NAME pointer_arithmetic MODULE 05_pointers_and_references STANDARD 26
|
||||
SOURCES src/pointer_arithmetic.cpp test/pointer_arithmetic_test.cpp)
|
||||
add_course_exercise(NAME dynamic_memory MODULE 05_pointers_and_references STANDARD 17
|
||||
add_course_exercise(NAME dynamic_memory MODULE 05_pointers_and_references STANDARD 26
|
||||
SOURCES src/dynamic_memory.cpp test/dynamic_memory_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME classes_and_objects MODULE 06_oop_basics STANDARD 17
|
||||
add_course_exercise(NAME classes_and_objects MODULE 06_oop_basics STANDARD 26
|
||||
SOURCES src/classes_and_objects.cpp test/classes_and_objects_test.cpp)
|
||||
add_course_exercise(NAME constructors MODULE 06_oop_basics STANDARD 17
|
||||
add_course_exercise(NAME constructors MODULE 06_oop_basics STANDARD 26
|
||||
SOURCES src/constructors.cpp test/constructors_test.cpp)
|
||||
add_course_exercise(NAME inheritance MODULE 06_oop_basics STANDARD 17
|
||||
add_course_exercise(NAME inheritance MODULE 06_oop_basics STANDARD 26
|
||||
SOURCES src/inheritance.cpp test/inheritance_test.cpp)
|
||||
add_course_exercise(NAME polymorphism MODULE 06_oop_basics STANDARD 17
|
||||
add_course_exercise(NAME polymorphism MODULE 06_oop_basics STANDARD 26
|
||||
SOURCES src/polymorphism.cpp src/inheritance.cpp test/polymorphism_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME sequential_containers MODULE 07_stl_containers STANDARD 17
|
||||
add_course_exercise(NAME sequential_containers MODULE 07_stl_containers STANDARD 26
|
||||
SOURCES src/sequential_containers.cpp test/sequential_containers_test.cpp)
|
||||
add_course_exercise(NAME associative_containers MODULE 07_stl_containers STANDARD 17
|
||||
add_course_exercise(NAME associative_containers MODULE 07_stl_containers STANDARD 26
|
||||
SOURCES src/associative_containers.cpp test/associative_containers_test.cpp)
|
||||
add_course_exercise(NAME unordered_containers MODULE 07_stl_containers STANDARD 17
|
||||
add_course_exercise(NAME unordered_containers MODULE 07_stl_containers STANDARD 26
|
||||
SOURCES src/unordered_containers.cpp test/unordered_containers_test.cpp)
|
||||
add_course_exercise(NAME container_adapters MODULE 07_stl_containers STANDARD 17
|
||||
add_course_exercise(NAME container_adapters MODULE 07_stl_containers STANDARD 26
|
||||
SOURCES src/container_adapters.cpp test/container_adapters_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME sort_and_find MODULE 08_stl_algorithms STANDARD 17
|
||||
add_course_exercise(NAME sort_and_find MODULE 08_stl_algorithms STANDARD 26
|
||||
SOURCES src/sort_and_find.cpp test/sort_and_find_test.cpp)
|
||||
add_course_exercise(NAME transform_reduce MODULE 08_stl_algorithms STANDARD 17
|
||||
add_course_exercise(NAME transform_reduce MODULE 08_stl_algorithms STANDARD 26
|
||||
SOURCES src/transform_reduce.cpp test/transform_reduce_test.cpp)
|
||||
add_course_exercise(NAME iterators MODULE 08_stl_algorithms STANDARD 17
|
||||
add_course_exercise(NAME iterators MODULE 08_stl_algorithms STANDARD 26
|
||||
SOURCES src/iterators.cpp test/iterators_test.cpp)
|
||||
add_course_exercise(NAME algorithm_lambdas MODULE 08_stl_algorithms STANDARD 17
|
||||
add_course_exercise(NAME algorithm_lambdas MODULE 08_stl_algorithms STANDARD 26
|
||||
SOURCES src/algorithm_lambdas.cpp test/algorithm_lambdas_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME auto_and_range_for MODULE 09_cpp11 STANDARD 11
|
||||
add_course_exercise(NAME auto_and_range_for MODULE 09_cpp11 STANDARD 26
|
||||
SOURCES src/auto_and_range_for.cpp test/auto_and_range_for_test.cpp)
|
||||
add_course_exercise(NAME smart_pointers MODULE 09_cpp11 STANDARD 11
|
||||
add_course_exercise(NAME smart_pointers MODULE 09_cpp11 STANDARD 26
|
||||
SOURCES src/smart_pointers.cpp test/smart_pointers_test.cpp)
|
||||
add_course_exercise(NAME move_semantics MODULE 09_cpp11 STANDARD 11
|
||||
add_course_exercise(NAME move_semantics MODULE 09_cpp11 STANDARD 26
|
||||
SOURCES src/move_semantics.cpp test/move_semantics_test.cpp)
|
||||
add_course_exercise(NAME constexpr_nullptr MODULE 09_cpp11 STANDARD 11
|
||||
add_course_exercise(NAME constexpr_nullptr MODULE 09_cpp11 STANDARD 26
|
||||
SOURCES src/constexpr_nullptr.cpp test/constexpr_nullptr_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME generic_lambdas MODULE 10_cpp14 STANDARD 14
|
||||
add_course_exercise(NAME generic_lambdas MODULE 10_cpp14 STANDARD 26
|
||||
SOURCES src/generic_lambdas.cpp test/generic_lambdas_test.cpp)
|
||||
add_course_exercise(NAME auto_return MODULE 10_cpp14 STANDARD 14
|
||||
add_course_exercise(NAME auto_return MODULE 10_cpp14 STANDARD 26
|
||||
SOURCES src/auto_return.cpp test/auto_return_test.cpp)
|
||||
add_course_exercise(NAME make_unique MODULE 10_cpp14 STANDARD 14
|
||||
add_course_exercise(NAME make_unique MODULE 10_cpp14 STANDARD 26
|
||||
SOURCES src/make_unique.cpp test/make_unique_test.cpp)
|
||||
add_course_exercise(NAME digit_separators MODULE 10_cpp14 STANDARD 14
|
||||
add_course_exercise(NAME digit_separators MODULE 10_cpp14 STANDARD 26
|
||||
SOURCES src/digit_separators.cpp test/digit_separators_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME structured_bindings MODULE 11_cpp17 STANDARD 17
|
||||
add_course_exercise(NAME structured_bindings MODULE 11_cpp17 STANDARD 26
|
||||
SOURCES src/structured_bindings.cpp test/structured_bindings_test.cpp)
|
||||
add_course_exercise(NAME optional MODULE 11_cpp17 STANDARD 17
|
||||
add_course_exercise(NAME optional MODULE 11_cpp17 STANDARD 26
|
||||
SOURCES src/optional.cpp test/optional_test.cpp)
|
||||
add_course_exercise(NAME variant MODULE 11_cpp17 STANDARD 17
|
||||
add_course_exercise(NAME variant MODULE 11_cpp17 STANDARD 26
|
||||
SOURCES src/variant.cpp test/variant_test.cpp)
|
||||
add_course_exercise(NAME if_constexpr MODULE 11_cpp17 STANDARD 17
|
||||
add_course_exercise(NAME if_constexpr MODULE 11_cpp17 STANDARD 26
|
||||
SOURCES src/if_constexpr.cpp test/if_constexpr_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME concepts MODULE 12_cpp20 STANDARD 20
|
||||
add_course_exercise(NAME concepts MODULE 12_cpp20 STANDARD 26
|
||||
SOURCES src/concepts.cpp test/concepts_test.cpp)
|
||||
add_course_exercise(NAME ranges MODULE 12_cpp20 STANDARD 20
|
||||
add_course_exercise(NAME ranges MODULE 12_cpp20 STANDARD 26
|
||||
SOURCES src/ranges.cpp test/ranges_test.cpp)
|
||||
add_course_exercise(NAME spaceship_operator MODULE 12_cpp20 STANDARD 20
|
||||
add_course_exercise(NAME spaceship_operator MODULE 12_cpp20 STANDARD 26
|
||||
SOURCES src/spaceship_operator.cpp test/spaceship_operator_test.cpp)
|
||||
add_course_exercise(NAME span MODULE 12_cpp20 STANDARD 20
|
||||
add_course_exercise(NAME span MODULE 12_cpp20 STANDARD 26
|
||||
SOURCES src/span.cpp test/span_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME expected MODULE 13_cpp23 STANDARD 23
|
||||
add_course_exercise(NAME expected MODULE 13_cpp23 STANDARD 26
|
||||
SOURCES src/expected.cpp test/expected_test.cpp)
|
||||
add_course_exercise(NAME print_and_format MODULE 13_cpp23 STANDARD 23
|
||||
add_course_exercise(NAME print_and_format MODULE 13_cpp23 STANDARD 26
|
||||
SOURCES src/print_and_format.cpp test/print_and_format_test.cpp)
|
||||
add_course_exercise(NAME mdspan MODULE 13_cpp23 STANDARD 23
|
||||
add_course_exercise(NAME mdspan MODULE 13_cpp23 STANDARD 26
|
||||
SOURCES src/mdspan.cpp test/mdspan_test.cpp)
|
||||
add_course_exercise(NAME ranges_zip MODULE 13_cpp23 STANDARD 23
|
||||
add_course_exercise(NAME ranges_zip MODULE 13_cpp23 STANDARD 26
|
||||
SOURCES src/ranges_zip.cpp test/ranges_zip_test.cpp)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
add_course_exercise(NAME constexpr_frontier MODULE 14_cpp26 STANDARD 23
|
||||
add_course_exercise(NAME constexpr_frontier MODULE 14_cpp26 STANDARD 26
|
||||
SOURCES src/constexpr_frontier.cpp test/constexpr_frontier_test.cpp)
|
||||
add_course_exercise(NAME monadic_expected MODULE 14_cpp26 STANDARD 23
|
||||
add_course_exercise(NAME monadic_expected MODULE 14_cpp26 STANDARD 26
|
||||
SOURCES src/monadic_expected.cpp test/monadic_expected_test.cpp)
|
||||
add_course_exercise(NAME pipeline_ranges MODULE 14_cpp26 STANDARD 23
|
||||
add_course_exercise(NAME pipeline_ranges MODULE 14_cpp26 STANDARD 26
|
||||
SOURCES src/pipeline_ranges.cpp test/pipeline_ranges_test.cpp)
|
||||
add_course_exercise(NAME custom_formatter MODULE 14_cpp26 STANDARD 23
|
||||
add_course_exercise(NAME custom_formatter MODULE 14_cpp26 STANDARD 26
|
||||
SOURCES src/custom_formatter.cpp test/custom_formatter_test.cpp)
|
||||
|
||||
Reference in New Issue
Block a user