Skip to content

Commit d2bd5f5

Browse files
author
cpprefjp-autoupdate
committed
update automatically
1 parent 36199e7 commit d2bd5f5

File tree

5 files changed

+65
-47
lines changed

5 files changed

+65
-47
lines changed

lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.html

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616

1717
<meta charset="UTF-8">
1818

19-
<title>elif/elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス</title>
19+
<title>elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス</title>
2020

2121
<meta name="viewport" content="width=device-width,initial-scale=1">
2222
<meta name="keywords" content="
2323
C++,標準ライブラリ,リファレンス,ドキュメント,STL,std,cpp23
2424
">
25-
<meta name="title" content="elif/elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
26-
<meta itemprop="name" content="elif/elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
27-
<meta property="og:title" content="elif/elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
25+
<meta name="title" content="elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
26+
<meta itemprop="name" content="elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
27+
<meta property="og:title" content="elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
2828
<meta property="og:url" content="https://cpprefjp.github.io/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.html" />
2929
<meta property="og:site_name" content="cpprefjp - C++日本語リファレンス" />
3030
<meta property="og:type" content="article" />
3131
<meta property="og:description" content="C++23では、以下のプリプロセス時条件式が追加される:" />
3232
<meta name="twitter:card" content="summary" />
33-
<meta name="twitter:title" content="elif/elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
33+
<meta name="twitter:title" content="elifdef/elifndefのサポートを追加 [P2334R1] - cpprefjp C++日本語リファレンス" />
3434
<meta name="twitter:url" content="https://cpprefjp.github.io/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.html" />
3535
<meta name="twitter:description" content="C++23では、以下のプリプロセス時条件式が追加される:" />
3636

@@ -171,7 +171,7 @@
171171
<span>
172172

173173

174-
<span itemprop="name">elif/elifdef/elifndefのサポートを追加 [P2334R1]</span>
174+
<span itemprop="name">elifdef/elifndefのサポートを追加 [P2334R1]</span>
175175

176176

177177
</span>
@@ -188,12 +188,12 @@
188188

189189
<p class="text-right"><small>
190190
最終更新日時(UTC):
191-
<span itemprop="datePublished" content="2024-07-08T07:33:21">
192-
2024年07月08日 07時33分21秒
191+
<span itemprop="datePublished" content="2024-11-16T16:24:19">
192+
2024年11月16日 16時24分19秒
193193
</span>
194194
<br/>
195195
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
196-
<span itemprop="name">Akira Takahashi</span>
196+
<span itemprop="name">onihusube</span>
197197
</span>
198198
が更新
199199
</small></p>
@@ -212,19 +212,18 @@
212212
<div class="row">
213213
<div class="col-sm-12 content-body">
214214

215-
<h1 itemprop="name"><span class="token">elif/elifdef/elifndefのサポートを追加 [P2334R1]</span><span class="cpp cpp23" title="C++23で追加">(C++23)</span></h1>
215+
<h1 itemprop="name"><span class="token">elifdef/elifndefのサポートを追加 [P2334R1]</span><span class="cpp cpp23" title="C++23で追加">(C++23)</span></h1>
216216
<div itemprop="articleBody"><p></p>
217217
<p>このページはC++23に採用された言語機能の変更を解説しています。</p>
218218
<p>のちのC++規格でさらに変更される場合があるため<a href="#relative-page">関連項目</a>を参照してください。</p>
219219
<p></p>
220220
<h2>概要</h2>
221221
<p>C++23では、以下のプリプロセス時条件式が追加される:</p>
222222
<ul>
223-
<li><code>#if</code>に対応する<code>#elif</code>を追加。<code>#if</code>/<code>#ifdef</code>/<code>#ifndef</code>が偽だった場合の条件式を記述できる</li>
224-
<li><code>#ifdef</code>に対応する<code>#elifdef</code>を追加。<code>#if</code>/<code>#ifdef</code>/<code>#ifndef</code>が偽だった場合の、特定の識別子が定義されているかの判定を記述できる</li>
225-
<li><code>#ifndef</code>に対応する<code>#elifndef</code>を追加。<code>#if</code>/<code>#ifdef</code>/<code>#ifndef</code>が偽だった場合の、特定の識別子が定義されていないかの判定を記述できる</li>
223+
<li><code>#ifdef</code>に対応する<code>#elif</code>である、<code>#elifdef</code>を追加。<code>#if</code>/<code>#ifdef</code>/<code>#ifndef</code>が偽だった場合の、特定の識別子(マクロ名)が定義されているかの判定を記述できる</li>
224+
<li><code>#ifndef</code>に対応する<code>#elif</code>である、<code>#elifndef</code>を追加。<code>#if</code>/<code>#ifdef</code>/<code>#ifndef</code>が偽だった場合の、特定の識別子(マクロ名)が定義されていないかの判定を記述できる</li>
226225
</ul>
227-
<p>これまでは<code>#if</code>が偽だった場合のさらなる条件式を記述するためには<code>#else</code>にネストして<code>#if</code>を記述する必要があったが、そのような条件分岐が書きやすくなる</p>
226+
<p>これまでは<code>#elif</code>において特定のマクロが定義されているかを調べるために<code>#elif defined(macro_name) / #elif !defined(macro_name)</code>と書く必要があり、<code>#if</code>に対する<code>#ifdef macro_name / #ifndef macro_name</code>のような短縮ディレクティブが用意されていなかったが、C++23からは<code>#if</code><code>#elif</code>の両方で<code>def/ndef</code>付きのディレクティブが利用できるようになる</p>
228227
<p><div class="codehilite"><pre><span></span><code><span class="cp">#define FOO 2</span>
229228

230229
<span class="cp">#if FOO == 1</span>

rss.xml

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,57 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<title>cpprefjp - C++日本語リファレンス</title>
44
<link href="https://cpprefjp.github.io" />
5-
<updated>2024-11-16T14:40:32.649188</updated>
6-
<id>5ce5b0ab-b39a-4924-a451-7dea91f8ed42</id>
5+
<updated>2024-11-16T16:27:23.874506</updated>
6+
<id>e94849c8-7509-4744-b1ef-7b42b4e94b17</id>
77

88

9+
<entry>
10+
<title>elifdef/elifndefのサポートを追加 [P2334R1] -- P2334R1 : elifはあった</title>
11+
<link href="https://cpprefjp.github.io/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.html"/>
12+
<id>5151c6a0ac0b782e30f8464c11cb72296acc0d21:lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.md</id>
13+
<updated>2024-11-17T01:24:19+09:00</updated>
14+
15+
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.md b/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.md
16+
index 50f00f7b5..ac742192c 100644
17+
--- a/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.md
18+
+++ b/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.md
19+
@@ -1,4 +1,4 @@
20+
-# elif/elifdef/elifndefのサポートを追加 [P2334R1]
21+
+# elifdef/elifndefのサポートを追加 [P2334R1]
22+
* cpp23[meta cpp]
23+
24+
&amp;lt;!-- start lang caution --&amp;gt;
25+
@@ -12,11 +12,11 @@
26+
## 概要
27+
C++23では、以下のプリプロセス時条件式が追加される:
28+
29+
-- `#if`に対応する`#elif`を追加。`#if`/`#ifdef`/`#ifndef`が偽だった場合の条件式を記述できる
30+
-- `#ifdef`に対応する`#elifdef`を追加。`#if`/`#ifdef`/`#ifndef`が偽だった場合の、特定の識別子が定義されているかの判定を記述できる
31+
-- `#ifndef`に対応する`#elifndef`を追加。`#if`/`#ifdef`/`#ifndef`が偽だった場合の、特定の識別子が定義されていないかの判定を記述できる
32+
+- `#ifdef`に対応する`#elif`である、`#elifdef`を追加。`#if`/`#ifdef`/`#ifndef`が偽だった場合の、特定の識別子(マクロ名)が定義されているかの判定を記述できる
33+
+- `#ifndef`に対応する`#elif`である、`#elifndef`を追加。`#if`/`#ifdef`/`#ifndef`が偽だった場合の、特定の識別子(マクロ名)が定義されていないかの判定を記述できる
34+
35+
-これまでは`#if`が偽だった場合のさらなる条件式を記述するためには`#else`にネストして`#if`を記述する必要があったが、そのような条件分岐が書きやすくなる。
36+
+
37+
+これまでは`#elif`において特定のマクロが定義されているかを調べるために`#elif defined(macro_name) / #elif !defined(macro_name)`と書く必要があり、`#if`に対する`#ifdef macro_name / #ifndef macro_name`のような短縮ディレクティブが用意されていなかったが、C++23からは`#if`と`#elif`の両方で`def/ndef`付きのディレクティブが利用できるようになる。
38+
39+
```cpp
40+
#define FOO 2
41+
@@ -36,4 +36,4 @@ C++23では、以下のプリプロセス時条件式が追加される:
42+
43+
44+
## 参照
45+
-- [P2334R1 Add support for preprocessing directives elifdef and elifndef](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf)
46+
\ No newline at end of file
47+
+- [P2334R1 Add support for preprocessing directives elifdef and elifndef](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf)
48+
&lt;/code&gt;&lt;/pre&gt;</summary>
49+
50+
<author>
51+
<name>onihusube</name>
52+
<email>44743040+onihusube@users.noreply.github.com</email>
53+
</author>
54+
</entry>
55+
956
<entry>
1057
<title>名前付きユニバーサルキャラクタ名 [P2071R2] -- 名前付きユニバーサルキャラクタ名: マッチングについて修正</title>
1158
<link href="https://cpprefjp.github.io/lang/cpp23/named_universal_character_escapes.html"/>
@@ -3290,32 +3337,4 @@ index 000000000..b512f12d4
32903337
</author>
32913338
</entry>
32923339

3293-
<entry>
3294-
<title>はじめてのコントリビュート -- 用語の誤った使い方を検出するCIの説明を追加</title>
3295-
<link href="https://cpprefjp.github.io/start_editing.html"/>
3296-
<id>710972af237d8d0cab53f90317494df675f0a3d0:start_editing.md</id>
3297-
<updated>2024-11-11T14:17:55+09:00</updated>
3298-
3299-
<summary type="html">&lt;pre&gt;&lt;code&gt;diff --git a/start_editing.md b/start_editing.md
3300-
index c200f29c9..dae4ce787 100644
3301-
--- a/start_editing.md
3302-
+++ b/start_editing.md
3303-
@@ -57,6 +57,9 @@ buildアクションで、MarkdownからHTMLへの変換と、GitHub Pagesへの
3304-
- NGワードの検出 (ngword checkアクション)
3305-
- 日本語入力環境における典型的な誤入力・誤変換をエラーとして検知する
3306-
- 具体的な対象ワードリストは[ngword_check.py](https://github.com/cpprefjp/site/blob/master/.github/workflows/script/ngword_check.py)を参照
3307-
+- 用語の誤った使い方を検出 (defined word checkアクション)
3308-
+ - 用語の許可した使い方、許可しない使い方を列挙し、許可した使い方以外の使われ方をエラーとして検出する
3309-
+ - 具体的な用語、許可した使い方、許可しない使い方は、[defined_word_check.py](https://github.com/cpprefjp/site/blob/master/.github/workflows/script/defined_word_check.py)を参照
3310-
3311-
3312-
### 自動反映ツール
3313-
&lt;/code&gt;&lt;/pre&gt;</summary>
3314-
3315-
<author>
3316-
<name>Akira Takahashi</name>
3317-
<email>faithandbrave@gmail.com</email>
3318-
</author>
3319-
</entry>
3320-
33213340
</feed>

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458

459459
<url>
460460
<loc>https://cpprefjp.github.io/lang/cpp23/add_support_for_preprocessing_directives_elifdef_and_elifndef.html</loc>
461-
<lastmod>2024-08-01T22:40:15+09:00</lastmod>
461+
<lastmod>2024-11-17T01:24:19+09:00</lastmod>
462462
<changefreq>daily</changefreq>
463463
<priority>0.7</priority>
464464
</url>

static/crsearch/crsearch.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/crsearch/crsearch.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)