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
@@ -0,0 +1,20 @@
#include "constexpr_frontier.hpp"
namespace cpp26 {
auto compile_time_factorial(int n) -> long long {
(void)n;
return 1;
}
auto compile_time_sum(std::array<int, 5> values) -> int {
(void)values;
return 0;
}
auto is_sorted(std::array<int, 5> values) -> bool {
(void)values;
return false;
}
} // namespace cpp26
+15
View File
@@ -0,0 +1,15 @@
#include "custom_formatter.hpp"
namespace cpp26 {
auto format_point(const Point& point) -> std::string {
(void)point;
return {};
}
auto format_points(const Point& a, const Point& b) -> std::string {
(void)a; (void)b;
return {};
}
} // namespace cpp26
+20
View File
@@ -0,0 +1,20 @@
#include "monadic_expected.hpp"
namespace cpp26 {
auto parse_id(const std::string& text) -> std::expected<int, ErrorCode> {
(void)text;
return std::unexpected(ErrorCode::Invalid);
}
auto load_user(int id) -> std::expected<std::string, ErrorCode> {
(void)id;
return std::unexpected(ErrorCode::NotFound);
}
auto load_user_name(const std::string& text) -> std::expected<std::string, ErrorCode> {
(void)text;
return std::unexpected(ErrorCode::Invalid);
}
} // namespace cpp26
+17
View File
@@ -0,0 +1,17 @@
#include "pipeline_ranges.hpp"
namespace cpp26 {
auto top_values_by_category(const std::vector<Record>& records, int min_value)
-> std::vector<Record> {
(void)records; (void)min_value;
return {};
}
auto total_by_category(const std::vector<Record>& records)
-> std::vector<std::pair<std::string, int>> {
(void)records;
return {};
}
} // namespace cpp26