{"id":31552264,"url":"https://github.com/ascendho/cpp-bootcamp","last_synced_at":"2025-10-04T19:30:02.231Z","repository":{"id":311620272,"uuid":"1044297819","full_name":"ascendho/cpp-bootcamp","owner":"ascendho","description":"🏕️ 卡内基梅隆大学为选修 15-445/645（Intro to Database Systems）开展的 C++ 语法迷你训练营，旨在提供现代 C++ 编码的基本介绍，涵盖引用和移动语义、模版、标准库（STL）容器、内存、同步基元等概念","archived":false,"fork":false,"pushed_at":"2025-09-04T08:15:47.000Z","size":154,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T10:29:19.721Z","etag":null,"topics":["bootcamp","cmu","cpp"],"latest_commit_sha":null,"homepage":"https://15445.courses.cs.cmu.edu/fall2025/faq.html#q5","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascendho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-25T13:25:43.000Z","updated_at":"2025-09-04T08:15:49.000Z","dependencies_parsed_at":"2025-08-25T16:13:15.904Z","dependency_job_id":"58bbe3c9-142c-4f65-b613-d14e29e2b3ea","html_url":"https://github.com/ascendho/cpp-bootcamp","commit_stats":null,"previous_names":["ascendho/cpp-bootcamp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ascendho/cpp-bootcamp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2Fcpp-bootcamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2Fcpp-bootcamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2Fcpp-bootcamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2Fcpp-bootcamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascendho","download_url":"https://codeload.github.com/ascendho/cpp-bootcamp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendho%2Fcpp-bootcamp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278365523,"owners_count":25975086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootcamp","cmu","cpp"],"created_at":"2025-10-04T19:30:00.097Z","updated_at":"2025-10-04T19:30:02.225Z","avatar_url":"https://github.com/ascendho.png","language":"C++","readme":"## C++ 现代语法特征训练营\n\n![image-20250825222353105](assets/image-20250825222353105.png)\n\n\u003e 本训练营旨在为你提供现代 C++ 编程的基础入门知识。C++ 语言的特性极为丰富且涉猎广泛，无法在一次训练营中全部涵盖，而且坦白说，这门语言最好通过实践来学习。工作人员相信，15-445 这门课程会让你成为一名更自信的 C++ 程序员！不过，我们确实会涉及一些在完成编程作业时必须掌握的 C++ 知识点。本教程不涵盖基础的 C/C++ 语法，主要介绍 C++ 的编程特性，尤其是那些 C 语言中不存在的概念。\n\n本仓库主要记录个人对该训练营内容的学习过程，并整理原项目代码文件的结构，使得更易于上手和使用；同时对英文注释进行翻译，对暂时具有语言障碍的新手更加友好；最后对大部分概念补充了一些简要的笔记，可供有需要的人参考。\n\n\n\n## 索引表\n\n| 序号 |             章节              |                             代码                             |                        笔记                         |\n| :--: | :---------------------------: | :----------------------------------------------------------: | :-------------------------------------------------: |\n|  1   | References and Move Semantics | \u003ca href=\"1 - References and Move Semantics/references.cpp\"\u003ereferences.cpp\u003c/a\u003e |                         N/A                         |\n|      |                               | \u003ca href=\"1 - References and Move Semantics/move_semantics.cpp\"\u003emove_semantics.cpp\u003c/a\u003e |     \u003ca href=\"notes/移动语义.md\"\u003e移动语义.md\u003c/a\u003e     |\n|      |                               | \u003ca href=\"1 - References and Move Semantics/move_constructors.cpp\"\u003emove_constructors.cpp\u003c/a\u003e | \u003ca href=\"notes/移动构造函数.md\"\u003e移动构造函数.md\u003c/a\u003e |\n|  2   |         C++ Templates         | \u003ca href=\"2 - C++ Templates/templated_functions.cpp\"\u003etemplated_functions.cpp\u003c/a\u003e |     \u003ca href=\"notes/模版函数.md\"\u003e模版函数.md\u003c/a\u003e     |\n|      |                               | \u003ca href=\"2 - C++ Templates/templated_classes.cpp\"\u003etemplated_classes.cpp\u003c/a\u003e |                         N/A                         |\n|  3   |             Misc              |  \u003ca href=\"3 - Misc/wrapper_class.cpp\"\u003ewrapper_class.cpp\u003c/a\u003e  |       \u003ca href=\"notes/包装类.md\"\u003e包装类.md\u003c/a\u003e       |\n|      |                               |       \u003ca href=\"3 - Misc/iterator.cpp\"\u003eiterator.cpp\u003c/a\u003e       |       \u003ca href=\"notes/迭代器.md\"\u003e迭代器.md\u003c/a\u003e       |\n|      |                               |     \u003ca href=\"3 - Misc/namespaces.cpp\"\u003enamespaces.cpp\u003c/a\u003e     |     \u003ca href=\"notes/命名空间.md\"\u003e命名空间.md\u003c/a\u003e     |\n|  4   |          Containers           |     \u003ca href=\"4 - Containers/vectors.cpp\"\u003evectors.cpp\u003c/a\u003e     |         \u003ca href=\"notes/向量.md\"\u003e向量.md\u003c/a\u003e         |\n|      |                               |        \u003ca href=\"4 - Containers\\sets.cpp\"\u003esets.cpp\u003c/a\u003e        |         \u003ca href=\"notes/集合.md\"\u003e集合.md\u003c/a\u003e         |\n|      |                               | \u003ca href=\"4 - Containers\\unordered_maps.cpp\"\u003eunordered_maps.cpp\u003c/a\u003e |       \u003ca href=\"notes\\哈希表.md\"\u003e哈希表.md\u003c/a\u003e       |\n|      |                               |        \u003ca href=\"4 - Containers/auto.cpp\"\u003eauto.cpp\u003c/a\u003e        |         \u003ca href=\"notes/auto.md\"\u003eauto.md\u003c/a\u003e         |\n|  5   |            Memory             |    \u003ca href=\"5 - Memory/unique_ptr.cpp\"\u003eunique_ptr.cpp\u003c/a\u003e    |    \u003ca href=\"notes/智能指针I.md\"\u003e智能指针I.md\u003c/a\u003e    |\n|      |                               |    \u003ca href=\"5 - Memory\\shared_ptr.cpp\"\u003eshared_ptr.cpp\u003c/a\u003e    |   \u003ca href=\"notes/智能指针II.md\"\u003e智能指针II.md\u003c/a\u003e   |\n|  6   |       Synch Primitives        |    \u003ca href=\"6 - Synch Primitives/mutex.cpp\"\u003emutex.cpp\u003c/a\u003e    |       \u003ca href=\"notes/互斥锁.md\"\u003e互斥锁.md\u003c/a\u003e       |\n|      |                               | \u003ca href=\"6 - Synch Primitives/scoped_lock.cpp\"\u003escoped_lock.cpp\u003c/a\u003e |     \u003ca href=\"notes/作用域锁.md\"\u003e作用域锁.md\u003c/a\u003e     |\n|      |                               | \u003ca href=\"6 - Synch Primitives\\condition_variable.cpp\"\u003econdition_variable.cpp\u003c/a\u003e |     \u003ca href=\"notes/条件变量.md\"\u003e条件变量.md\u003c/a\u003e     |\n|      |                               |   \u003ca href=\"6 - Synch Primitives\\rwlock.cpp\"\u003erwlock.cpp\u003c/a\u003e   |        \u003ca href=\"notes/读写锁\"\u003e读写锁.md\u003c/a\u003e         |\n|  -   |          spring2024           |    \u003ca href=\"spring2024\\s24_my_ptr.cpp\"\u003es24_my_ptr.cpp\u003c/a\u003e    |                         N/A                         |\n\n\n\n## 构建方式\n\n该训练营包含若干 C++ 代码文件，位于各章节目录下，建议深入研读。每个代码文件均可编译为与其同名的可执行文件。请使用 CMake 构建这些可执行文件，以下一组命令应能完成所有可执行文件的构建：\n\n```cmake\n$ mkdir build\n$ cd build\n$ cmake ..      // 调用CMake工具，去上级目录寻找CMakeLists.txt文件\n$ make -j8      // 调用Make工具来执行编译，-j表示并行，8表示最多使用8个CPU核心 \n```\n\n执行这些命令后，生成的可执行文件将位于 `build` 目录中。例如， `1 - References and Move Semantics/references.cpp`  文件会编译为 `references` 可执行文件，位于 `./build` 目录下。其余代码文件亦是如此。\n\n\n\n## 参考资源\n\n虽然这次集训营力求尽可能全面，但它仍然只涵盖了使用现代 C++ 的基础内容，在你应用 C++ 构建大型程序的过程中，还需要查阅很多其它可用的资源。下面列举几例，它们的内容都非常全面（比这次集训营全面得多），但在可读性方面可能有所欠缺。但总的来说，我认为还是应该试着去阅读并理解这些资料，尤其是在做项目的时候。\n\n1.  \u003ca href=\"https://en.cppreference.com/w\"\u003ecppreference\u003c/a\u003e：非官方但相当准确的 C++ 和 C 标准摘要及示例\n2.  \u003ca href=\"https://cplusplus.com/\"\u003ecplusplus\u003c/a\u003e：包含 \u003ca href=\"https://cplusplus.com/doc/tutorial/\"\u003eC++语言教程\u003c/a\u003e 和 \u003ca href=\"https://cplusplus.com/reference/\"\u003eC++库参考手册\u003c/a\u003e 两部分内容\n3.  \u003ca href=\"https://github.com/changkun/modern-cpp-tutorial\"\u003e《现代 C++ 教程》\u003c/a\u003e：此GitHub仓库包含一些实用的信息和练习题\n\n\n\n## 许可证\n\n1. 本项目基于 \u003ca href=\"https://github.com/cmu-db/15445-bootcamp\"\u003e15445-bootcamp\u003c/a\u003e 进行翻译和扩展，原项目版权（包括源代码文件）归属 \u003ca href=\"https://github.com/cmu-db/15445-bootcamp/graphs/contributors\"\u003e**原作者**\u003c/a\u003e 所有，扩充的笔记内容归属本人所有，均遵循  \u003ca href=\"LICENSE\"\u003eApache License 2.0\u003c/a\u003e 协议。\n2. 本仓库作为个人学习进度的记录，包括相关材料的整理备份、翻译和补充，并对有需要的人提供帮助。\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendho%2Fcpp-bootcamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascendho%2Fcpp-bootcamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendho%2Fcpp-bootcamp/lists"}