Skip to content

Commit c644004

Browse files
fix: clear the little todos (#58)
* fix: clear the little todos 本轮把 14 卷 TODO 里堆积的一批 quick 级缺口一次清掉,共 9 项,并同步英文翻译。 正确性修复: - vol4/05-spaceship-operator「坑1」: 旧结论「只写 <=> 不写 == 会编译错误」已过时 (P1185 后 defaulted <=> 隐式生成 ==,g++ 16.1.1 / clang 22.1.6 双编译器实测)。 改写为真实会踩的坑「默认 == 不会反向生成 <=>」,附双编译器实测输出。 - vol9 once_callback: enum Status 补 : uint8_t(与正文一致)、补 <cstdint>/<memory>、 测试计数笔误 11→12(实测源码确为 12 个 TEST_CASE)、裸代码块补语言标记。 内容补充与交叉链接: - vol2: constexpr-ctor frontmatter 补 C++20、第五节标题「(C++20 预告)」→「(C++20)」; udl-basics 补「小结」。 - vol5: ch09 两篇加「概念导览」标注;补三条跨卷链接(ch06→卷四协程、 ch08→卷六性能、ch03→卷八中断安全)。 - vol10: 6 处行内代码路径改为可点的 GitHub blob 链接;汇编系列 3 篇加延伸阅读 (卷六 AVX/AVX2、卷七 编译器选项)。 导航与结构整理: - projects/index 从空壳升级为可用导航页(4 条跨卷/外链 + 近期/规划项目)。 - vol8 嵌入式补 00/01/02 三个目录的 index.md;embedded/index 去掉「规划中」、 纳入四系列入口。 - 卷八删除冗余 06-array-vs-raw-arrays(卷三 01-array 已覆盖);EBO 从 embedded(stm32f1) 迁到 vol4(host),CN/EN 全链路同步。 - vol1 c_tutorials 49 处「// TODO:」统一改为「// 练习:」,消除规划噪音。 治理: - todo/000、todo/031 勾掉已完成的验收项;修正 091 stale 引用。 英文同步: - 用 translate.py(glm-4.6) 同步本轮改动文件的英文镜像,并重译修复 ch07 被污染成广告内容的英文镜像. (LLM翻译还是要指日可待啊) * ci: fix the read time issue of en version
1 parent 2165d4a commit c644004

75 files changed

Lines changed: 4058 additions & 5475 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
---
2020

2121
<!-- COVERAGE_START -->
22-
![English Coverage](https://img.shields.io/badge/en_coverage-99%25-green.svg) 428/431 docs translated
22+
![English Coverage](https://img.shields.io/badge/en_coverage-99%25-green.svg) 430/433 docs translated
2323
<!-- COVERAGE_END -->
2424

2525
## 这是什么项目

code/volumn_codes/vol9/chrome_design/once_callback/once_callback.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
#pragma once
1313
#include "cancel_token/cancel_token.hpp"
14+
#include <cstdint>
1415
#include <functional>
16+
#include <memory>
1517

1618
namespace tamcpp::chrome {
1719

@@ -38,7 +40,7 @@ class OnceCallback<ReturnType(FuncArgs...)> // Specialization of Functional like
3840
using FuncSig = ReturnType(FuncArgs...);
3941

4042
private:
41-
enum class Status {
43+
enum class Status : uint8_t {
4244
kEmpty, // Null when construction with no lambda or func specified
4345
kValid, // validate for usage
4446
kConsumed // Has been callbacked
@@ -97,8 +99,10 @@ class OnceCallback<ReturnType(FuncArgs...)> // Specialization of Functional like
9799
* @return false
98100
*/
99101
[[nodiscard]] bool is_cancelled() const noexcept {
100-
if (status_ != Status::kValid) return true;
101-
if (token_ && !token_->is_valid()) return true;
102+
if (status_ != Status::kValid)
103+
return true;
104+
if (token_ && !token_->is_valid())
105+
return true;
102106
return false;
103107
}
104108
[[nodiscard]] bool maybe_valid() const noexcept { return !is_cancelled(); }

documents/en/projects/index.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
---
2-
title: End-to-End Hands-On Project
3-
description: Handwritten STL, HTTP server, GUI framework, embedded OS, and other comprehensive
4-
projects
2+
title: Comprehensive Hands-on Project
3+
description: Synthesize scattered knowledge from various volumes into complete projects—from
4+
coroutine servers, mini runtimes, to industrial-grade component analysis.
55
platform: host
66
tags:
77
- cpp-modern
88
- host
99
- intermediate
1010
translation:
1111
source: documents/projects/index.md
12-
source_hash: 3a6ccce746db47489eb825a9ddde30ec4ba65e96ff42697b0adc3c93c6be84df
13-
translated_at: '2026-05-26T10:20:16.450396+00:00'
12+
source_hash: 42eb53b42495d01aa1fb318f2084582052831d6c383d0cf22598181cb3c8fd75
13+
translated_at: '2026-06-13T11:40:38.476774+00:00'
1414
engine: anthropic
15-
token_count: 106
15+
token_count: 324
1616
---
1717
# Comprehensive Hands-on Projects
1818

19-
> Status: Planned
19+
> This section is not merely a pile of new concepts, but an effort to weave together the fragments learned across various volumes—concurrency, coroutines, templates, memory management—into a complete project that runs, tests, and can be delivered. Below, we first list projects that have already been implemented in other volumes and are ready for you to continue, followed by long-term goals still in the planning phase.
2020
21-
## Overview
21+
## Projects with a Foundation
2222

23-
This section features comprehensive hands-on projects that span the entire tutorial:
23+
These projects already have tutorials or runnable skeletons in other volumes, providing a path for you to dive deeper:
2424

25-
1. **Hand-rolled STL Components**: vector, string, unique_ptr, optional, function, variant
26-
2. **Mini HTTP Server**: from TCP to asynchronous coroutines
27-
3. **Mini GUI Framework**: event loop, widget system, layout engine, rendering backend
28-
4. **Embedded Operating System**: scheduler, synchronization primitives, memory management, driver framework
29-
5. **INI Parser** (basic version available)
30-
6. **Coroutine Echo Server** (basic version available)
25+
- **Coroutine Echo Server**: In [Volume 5: Coroutine Echo Server](../vol5-concurrency/ch06-async-io-coroutine/05-coroutine-echo-server.md), we built a fully functional echo service from `io_uring` to data transmission. This is the most practical project for understanding coroutine scheduling.
26+
- **Mini Concurrent Runtime (Capstone)**: [Volume 5: Mini Runtime Capstone](../vol5-concurrency/exercises/06-capstone-mini-runtime.md) combines thread pools, timers, and task queues into a minimal scheduler, serving as a ready-made starting point for the "Mini Concurrent Runtime".
27+
- **OnceCallback Component Study**: [Volume 9: OnceCallback](../vol9-open-source-project-learn/chrome/01_once_callback/index.md) dissects Chromium's callback mechanism across 16 articles, serving as a paradigm for transitioning from reading source code to designing industrial-grade components yourself.
28+
- **INI Parser**: As the first complete project for C++ engineering, this is located in a separate repository [Tutorial_cpp_SimpleIniParser](https://github.com/Awesome-Embedded-Learning-Studio/Tutorial_cpp_SimpleIniParser)—covering lexical analysis to error handling, it is perfect for following along from start to finish.
3129

32-
## Project Navigation
30+
## Planned Projects
3331

34-
> Content is being written, stay tuned.
32+
These have not yet started and are long-term goals, sorted by "readiness of materials":
33+
34+
- **Hand-rolled STL Components**: Implement `vector`, `string`, `unique_ptr`, `optional`, `function`, and `variant` from scratch, complementing the source code reading in Volume 3 (Standard Library).
35+
- **Mini HTTP Server**: From TCP sockets to coroutine-based asynchrony, building upon Volume 5 (Concurrency) and Volume 8 (Network Programming).
36+
- **Mini GUI Framework**: Event loops, widget systems, layout engines, and rendering backends.
37+
- **Embedded Mini OS**: Scheduler, synchronization primitives, memory management, and driver framework, extending the main thread of Volume 8 (Embedded Systems).
38+
39+
> These projects will not be completed overnight; they will be launched gradually as the content in their respective volumes is finalized. If you have a project you would like to see, feel free to propose it in the Discussions.

0 commit comments

Comments
 (0)