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
+3
View File
@@ -0,0 +1,3 @@
#include "auto_return.hpp"
// Implementations live in the header because decltype(auto) requires a visible body.
+20
View File
@@ -0,0 +1,20 @@
#include "digit_separators.hpp"
namespace cpp14 {
auto million() -> int {
// TODO: Return 1'000'000 using digit separators
return 0;
}
auto mask() -> std::uint32_t {
// TODO: Return 0xFF00'00FF
return 0;
}
auto bits_set() -> int {
// TODO: Return population count of mask()
return 0;
}
} // namespace cpp14
+16
View File
@@ -0,0 +1,16 @@
#include "generic_lambdas.hpp"
namespace cpp14 {
auto apply_twice(const std::vector<int>& values) -> std::vector<int> {
(void)values;
return {};
}
auto concat_any(const std::vector<std::string>& a, const std::vector<std::string>& b)
-> std::vector<std::string> {
(void)a; (void)b;
return {};
}
} // namespace cpp14
+20
View File
@@ -0,0 +1,20 @@
#include "make_unique.hpp"
namespace cpp14 {
auto make_task(std::string name, int priority) -> std::unique_ptr<Task> {
(void)name; (void)priority;
return nullptr;
}
auto clone_task(const Task& task) -> std::unique_ptr<Task> {
(void)task;
return nullptr;
}
auto total_priority(const std::vector<std::unique_ptr<Task>>& tasks) -> int {
(void)tasks;
return 0;
}
} // namespace cpp14