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
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include <algorithm>
#include <cctype>
#include <concepts>
#include <string>
#include <vector>
namespace cpp20 {
template <std::integral T>
[[nodiscard]] auto double_value(T value) -> T {
(void)value;
return T{};
}
template <std::floating_point T>
[[nodiscard]] auto clamp01(T value) -> T {
(void)value;
return T{};
}
template <typename T>
concept StringLike = requires(T value) {
{ value.size() } -> std::convertible_to<std::size_t>;
{ value.data() } -> std::convertible_to<const char*>;
};
template <StringLike T>
[[nodiscard]] auto uppercase_copy(const T& text) -> std::string {
(void)text;
return {};
}
[[nodiscard]] auto sum_integral(const std::vector<int>& data) -> int;
} // namespace cpp20