Initial Course
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user