Initial Course

This commit is contained in:
David Gil de Gómez Pérez
2026-08-11 17:40:36 +03:00
commit 9aed1d1d86
202 changed files with 3420 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
#include "concepts.hpp"
namespace cpp20 {
auto sum_integral(const std::vector<int>& data) -> int {
(void)data;
return 0;
}
} // namespace cpp20
+20
View File
@@ -0,0 +1,20 @@
#include "ranges.hpp"
namespace cpp20 {
auto even_numbers(const std::vector<int>& input) -> std::vector<int> {
(void)input;
return {};
}
auto take_first_three(const std::vector<int>& input) -> std::vector<int> {
(void)input;
return {};
}
auto join_strings(const std::vector<std::string>& parts) -> std::string {
(void)parts;
return {};
}
} // namespace cpp20
@@ -0,0 +1,15 @@
#include "spaceship_operator.hpp"
namespace cpp20 {
auto sort_versions(std::vector<Version> versions) -> std::vector<Version> {
(void)versions;
return {};
}
auto is_sorted_versions(const std::vector<Version>& versions) -> bool {
(void)versions;
return false;
}
} // namespace cpp20
+21
View File
@@ -0,0 +1,21 @@
#include "span.hpp"
namespace cpp20 {
auto span_sum(std::span<const int> data) -> int {
(void)data;
return 0;
}
auto first_and_last(std::span<const int> data) -> std::pair<int, int> {
(void)data;
return {0, 0};
}
auto make_subspan(std::span<const int> data, std::size_t offset, std::size_t count)
-> std::vector<int> {
(void)data; (void)offset; (void)count;
return {};
}
} // namespace cpp20