File tree Expand file tree Collapse file tree 7 files changed +535
-5
lines changed
Expand file tree Collapse file tree 7 files changed +535
-5
lines changed Original file line number Diff line number Diff line change @@ -1716,6 +1716,7 @@ <h2 id="_9">救命!为什么我的全局函数不能作为函数对象?</h2>
17161716< p > < img src ="../img/awesomeface.png " height ="30px " width ="auto " style ="margin: 0; border: none "/> 建议修改标准库,把小彭老师这两个真正好用的宏塞到 < code > <utility></ code > 和 < code > <functional></ code > 里,作为 C++26 标准的一部分。</ p >
17171717</ blockquote >
17181718< h2 id ="map-any "> map + any 外挂属性</ h2 >
1719+ < p > TODO</ p >
17191720< h2 id ="shared_ptr-deleter "> 自定义 shared_ptr 的 deleter</ h2 >
17201721< h2 id ="check_cuda "> CHECK_CUDA 类错误检测宏</ h2 >
17211722< h2 id ="_10 "> 函数默认参数求值的位置是调用者</ h2 >
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -776,7 +776,7 @@ <h2 id="_6">跨接口的适配器</h2>
776776};
777777</ code > </ pre >
778778< p > 他们要求的用法是先判断 hasNext(),然后才能调用 getNext 读取出真正的值。小彭老师设计了一个 Poost 适配器,把 PoostInputer 翻译成我们的 Inputer:</ p >
779- < pre > < code class ="language-cpp "> struct PoostInputerAdapter {
779+ < pre > < code class ="language-cpp "> struct PoostInputerAdapter : Inputer {
780780 PoostInputer *poostIn;
781781
782782 PoostInputerAdapter(PoostInputer *poostIn)
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ <h2 id="_1">前言</h2>
276276< blockquote >
277277< p > < img src ="./img/bulb.png " height ="30px " width ="auto " style ="margin: 0; border: none "/> 本书还在持续更新中……要追番的话,可以在 < a href ="https://github.com/parallel101/cppguidebook "> GitHub</ a > 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</ p >
278278</ blockquote >
279- < p > 更新时间:2024年08月28日 23:08:04 (UTC+08:00)</ p >
279+ < p > 更新时间:2024年08月30日 17:36:18 (UTC+08:00)</ p >
280280< p > < a href ="https://parallel101.github.io/cppguidebook "> 在 GitHub Pages 浏览本书</ a > | < a href ="https://142857.red/book "> 在小彭老师自己维护的镜像上浏览本书</ a > </ p >
281281< h2 id ="_2 "> 格式约定</ h2 >
282282< blockquote >
Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ <h2 id="index-_1">前言</h2>
389389<blockquote>
390390<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
391391</blockquote>
392- <p>更新时间:2024年08月28日 23:08:04 (UTC+08:00)</p>
392+ <p>更新时间:2024年08月30日 17:36:18 (UTC+08:00)</p>
393393<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
394394<h2 id="index-_2">格式约定</h2>
395395<blockquote>
@@ -2343,6 +2343,7 @@ <h2 id="cpp_tricks-_9">救命!为什么我的全局函数不能作为函数对
23432343<p><img src="../img/awesomeface.png" height="30px" width="auto" style="margin: 0; border: none"/> 建议修改标准库,把小彭老师这两个真正好用的宏塞到 <code><utility></code> 和 <code><functional></code> 里,作为 C++26 标准的一部分。</p>
23442344</blockquote>
23452345<h2 id="cpp_tricks-map-any">map + any 外挂属性</h2>
2346+ <p>TODO</p>
23462347<h2 id="cpp_tricks-shared_ptr-deleter">自定义 shared_ptr 的 deleter</h2>
23472348<h2 id="cpp_tricks-check_cuda">CHECK_CUDA 类错误检测宏</h2>
23482349<h2 id="cpp_tricks-_10">函数默认参数求值的位置是调用者</h2>
@@ -11213,7 +11214,7 @@ <h2 id="design_virtual-_6">跨接口的适配器</h2>
1121311214};
1121411215</code></pre>
1121511216<p>他们要求的用法是先判断 hasNext(),然后才能调用 getNext 读取出真正的值。小彭老师设计了一个 Poost 适配器,把 PoostInputer 翻译成我们的 Inputer:</p>
11216- <pre><code class="language-cpp">struct PoostInputerAdapter {
11217+ <pre><code class="language-cpp">struct PoostInputerAdapter : Inputer {
1121711218 PoostInputer *poostIn;
1121811219
1121911220 PoostInputerAdapter(PoostInputer *poostIn)
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments