File tree 5 files changed +11
-5
lines changed
5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ <h2 id="_1">前言</h2>
292
292
< blockquote >
293
293
< 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 >
294
294
</ blockquote >
295
- < p > 更新时间:2024年10月25日 12:54:18 (UTC+08:00)</ p >
295
+ < p > 更新时间:2024年10月26日 15:16:22 (UTC+08:00)</ p >
296
296
< p > < a href ="https://parallel101.github.io/cppguidebook "> 在 GitHub Pages 浏览本书</ a > | < a href ="https://142857.red/book "> 在小彭老师自己维护的镜像上浏览本书</ a > </ p >
297
297
< h2 id ="_2 "> 格式约定</ h2 >
298
298
< blockquote >
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ <h2 id="index-_1">前言</h2>
421
421
<blockquote>
422
422
<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>
423
423
</blockquote>
424
- <p>更新时间:2024年10月25日 12:54:18 (UTC+08:00)</p>
424
+ <p>更新时间:2024年10月26日 15:16:22 (UTC+08:00)</p>
425
425
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
426
426
<h2 id="index-_2">格式约定</h2>
427
427
<blockquote>
@@ -6003,9 +6003,12 @@ <h2 id="type_rich_api-_60">—</h2>
6003
6003
</code></pre>
6004
6004
<pre><code class="language-cpp">struct Name : Typed<Name, std::string> {};
6005
6005
6006
- struct Meter : Typed<Meter, double> {};
6006
+ struct Meter : Typed<Meter, double> {
6007
+ using Typed<Kilometer, double>::Typed;
6008
+ };
6007
6009
6008
6010
struct Kilometer : Typed<Kilometer, double> {
6011
+ using Typed<Kilometer, double>::Typed;
6009
6012
operator Meter() const {
6010
6013
// 允许隐式转换为米
6011
6014
return Meter(value * 1000);
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -1793,9 +1793,12 @@ <h2 id="_60">—</h2>
1793
1793
</ code > </ pre >
1794
1794
< pre > < code class ="language-cpp "> struct Name : Typed<Name, std::string> {};
1795
1795
1796
- struct Meter : Typed<Meter, double> {};
1796
+ struct Meter : Typed<Meter, double> {
1797
+ using Typed<Kilometer, double>::Typed;
1798
+ };
1797
1799
1798
1800
struct Kilometer : Typed<Kilometer, double> {
1801
+ using Typed<Kilometer, double>::Typed;
1799
1802
operator Meter() const {
1800
1803
// 允许隐式转换为米
1801
1804
return Meter(value * 1000);
You can’t perform that action at this time.
0 commit comments