File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ <h2 id="_1">前言</h2>
248
248
< blockquote >
249
249
< 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 >
250
250
</ blockquote >
251
- < p > 更新时间:2024年08月14日 11:48:21 (UTC+08:00)</ p >
251
+ < p > 更新时间:2024年08月14日 11:49:15 (UTC+08:00)</ p >
252
252
< h2 id ="_2 "> 格式约定</ h2 >
253
253
< blockquote >
254
254
< p > < img src ="./img/bulb.png " height ="30px " width ="auto " style ="margin: 0; border: none "/> 用这种颜色字体书写的内容是温馨提示</ p >
@@ -296,12 +296,12 @@ <h2 id="_4">举个例子</h2>
296
296
< p > 但仅仅是回到 C++17,没有 < code > requires</ code > 语法,我们只能自己定义一个 trait 类,并运用烦人的 SFINAE 小技巧,检测表达式是否的合法,又臭又长。</ p >
297
297
< pre > < code class ="language-cpp "> template <class T, class = void>
298
298
struct has_foo {
299
- inline constexpr bool value = false;
299
+ static constexpr bool value = false;
300
300
};
301
301
302
302
template <class T>
303
303
struct has_foo<T, std::void_t<decltype(std::declval<T>().foo())>> {
304
- inline constexpr bool value = true;
304
+ static constexpr bool value = true;
305
305
};
306
306
307
307
template <class T>
Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ <h2 id="index-_1">前言</h2>
345
345
<blockquote>
346
346
<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>
347
347
</blockquote>
348
- <p>更新时间:2024年08月14日 11:48:21 (UTC+08:00)</p>
348
+ <p>更新时间:2024年08月14日 11:49:15 (UTC+08:00)</p>
349
349
<h2 id="index-_2">格式约定</h2>
350
350
<blockquote>
351
351
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 用这种颜色字体书写的内容是温馨提示</p>
@@ -393,12 +393,12 @@ <h2 id="index-_4">举个例子</h2>
393
393
<p>但仅仅是回到 C++17,没有 <code>requires</code> 语法,我们只能自己定义一个 trait 类,并运用烦人的 SFINAE 小技巧,检测表达式是否的合法,又臭又长。</p>
394
394
<pre><code class="language-cpp">template <class T, class = void>
395
395
struct has_foo {
396
- inline constexpr bool value = false;
396
+ static constexpr bool value = false;
397
397
};
398
398
399
399
template <class T>
400
400
struct has_foo<T, std::void_t<decltype(std::declval<T>().foo())>> {
401
- inline constexpr bool value = true;
401
+ static constexpr bool value = true;
402
402
};
403
403
404
404
template <class T>
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments