Skip to content

Commit ad958c3

Browse files
committed
Update
1 parent 3de49ca commit ad958c3

10 files changed

Lines changed: 38 additions & 38 deletions

cpp.cond.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</div></div><div class='texpara'><a class='index' id=':__has_include'></a><div class='bnf' id='nt:has-include-expression'>
1010
<a class='hidden_link' href='#nt:has-include-expression' title='15.2&emsp;Conditional inclusion&emsp;[cpp.cond]'><span id='nt:has-include-expression'><span id=':has-include-expression'>has-include-expression<span class='textnormal'>:</span></span></span></a><br><span class='terminal'><span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span></span> <span class='terminal'><span class='parenthesis'>(</span></span> <a href='lex.header#nt:header-name' title='5.6&emsp;Header names&emsp;[lex.header]'><span id='ntref:header-name'><span class='textsf'><i >header-name</i></span></span></a> <span class='terminal'><span class='parenthesis'>)</span></span><br><span class='terminal'><span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span></span> <span class='terminal'><span class='parenthesis'>(</span></span> <a href='#nt:header-name-tokens' title='15.2&emsp;Conditional inclusion&emsp;[cpp.cond]'><span id='ntref:header-name-tokens'><span class='textsf'><i >header-name-tokens</i></span></span></a> <span class='terminal'><span class='parenthesis'>)</span></span>
1111
</div></div><div class='texpara'><a class='index' id=':__has_embed'></a><div class='bnf' id='nt:has-embed-expression'>
12-
<a class='hidden_link' href='#nt:has-embed-expression' title='15.2&emsp;Conditional inclusion&emsp;[cpp.cond]'><span id='nt:has-embed-expression'><span id=':has-embed-expression'>has-embed-expression<span class='textnormal'>:</span></span></span></a><br><span class='terminal'><span class='texttt'>__has_<span class='shy'></span>embed</span></span> <span class='terminal'><span class='parenthesis'>(</span></span> <a href='cpp.pre#nt:pp-balanced-token-seq' title='15.1&emsp;Preamble&emsp;[cpp.pre]'><span id='ntref:pp-balanced-token-seq'><span class='textsf'><i >pp-balanced-token-seq</i></span></span></a> <span class='terminal'><span class='parenthesis'>)</span></span>
12+
<a class='hidden_link' href='#nt:has-embed-expression' title='15.2&emsp;Conditional inclusion&emsp;[cpp.cond]'><span id='nt:has-embed-expression'><span id=':has-embed-expression'>has-embed-expression<span class='textnormal'>:</span></span></span></a><br><span class='terminal'><span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>embed</span></span></span> <span class='terminal'><span class='parenthesis'>(</span></span> <a href='cpp.pre#nt:pp-balanced-token-seq' title='15.1&emsp;Preamble&emsp;[cpp.pre]'><span id='ntref:pp-balanced-token-seq'><span class='textsf'><i >pp-balanced-token-seq</i></span></span></a> <span class='terminal'><span class='parenthesis'>)</span></span>
1313
</div></div><div class='texpara'><a class='index' id=':__has_cpp_attribute'></a><div class='bnf' id='nt:has-attribute-expression'>
1414
<a class='hidden_link' href='#nt:has-attribute-expression' title='15.2&emsp;Conditional inclusion&emsp;[cpp.cond]'><span id='nt:has-attribute-expression'><span id=':has-attribute-expression'>has-attribute-expression<span class='textnormal'>:</span></span></span></a><br><span class='terminal'><span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>cpp_<span class='shy'></span>attribute</span></span> <span class='parenthesis'>(</span></span> <a href='cpp.pre#nt:pp-tokens' title='15.1&emsp;Preamble&emsp;[cpp.pre]'><span id='ntref:pp-tokens'><span class='textsf'><i >pp-tokens</i></span></span></a> <span class='terminal'><span class='parenthesis'>)</span></span>
1515
</div></div><div class='para' id='1'><div class='marginalizedparent'><a class='marginalized' href='#1'>1</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/9b8a5e51752efe9edd7a447e96ffab0f3313accc/source/preprocessor.tex#L374'>#</a></div><div class='texpara'><div id='1.sentence-1' class='sentence'>The expression that controls conditional inclusion
@@ -71,8 +71,8 @@
7171
<span class='texttt'><span class='preprocessordirective'>#ifdef</span></span>, <span class='texttt'><span class='preprocessordirective'>#ifndef</span></span>, <span class='texttt'><span class='preprocessordirective'>#elifdef</span></span>, and <span class='texttt'><span class='preprocessordirective'>#elifndef</span></span>
7272
directives, and
7373
the <span class='texttt'><span class='preprocessordirective'>defined</span></span> conditional inclusion operator,
74-
shall treat <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span>, <span class='texttt'>__has_<span class='shy'></span>embed</span>, and <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>cpp_<span class='shy'></span>attribute</span></span>
75-
as if they were the names of defined macros<a class='hidden_link' href='#8.sentence-1'>.</a></div> <div id='8.sentence-2' class='sentence'>The identifiers <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span>, <span class='texttt'>__has_<span class='shy'></span>embed</span>, and <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>cpp_<span class='shy'></span>attribute</span></span>
74+
shall treat <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span>, <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>embed</span></span>, and <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>cpp_<span class='shy'></span>attribute</span></span>
75+
as if they were the names of defined macros<a class='hidden_link' href='#8.sentence-1'>.</a></div> <div id='8.sentence-2' class='sentence'>The identifiers <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>include</span></span>, <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>embed</span></span>, and <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>cpp_<span class='shy'></span>attribute</span></span>
7676
shall not appear in any context not mentioned in this subclause<a class='hidden_link' href='#8.sentence-2'>.</a></div></div></div><div class='para' id='9'><div class='marginalizedparent'><a class='marginalized' href='#9'>9</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/9b8a5e51752efe9edd7a447e96ffab0f3313accc/source/preprocessor.tex#L502'>#</a></div><div class='texpara'><div id='9.sentence-1' class='sentence'>Each preprocessing token that remains (in the list of preprocessing tokens that
7777
will become the controlling expression)
7878
after all macro replacements have occurred

cpp.embed.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@
115115
<a href='expr.const#nt:constant-expression' title='7.7&emsp;Constant expressions&emsp;[expr.const]'><span id='ntref:constant-expression_'><span class='textsf'><i >constant-expression</i></span></span></a> using the rules as described in conditional
116116
inclusion (<a href='cpp.cond' title='15.2&emsp;Conditional inclusion'>[cpp.<span class='shy'></span>cond]</a>), but without being processed as in normal text an
117117
additional time<a class='hidden_link' href='#param.limit-2.sentence-1'>.</a></div></div><div class='texpara'><div id='param.limit-example-1' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#param.limit-example-1'>1</a></i>:&ensp;<span class='codeblock'><span class='preprocessordirective'>#undef</span> DATA_LIMIT
118-
<span class='preprocessordirective'>#if</span> __has_embed<span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span>DATA_LIMIT<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
118+
<span class='preprocessordirective'>#if</span> <span class='preprocessordirective'>__has_embed</span><span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span>DATA_LIMIT<span class='parenthesis'>)</span><span class='parenthesis'>)</span>
119119
<span class='preprocessordirective'>#endif</span>
120-
</span></div><div class='texpara'><div id='param.limit-2.sentence-2' class='sentence'>is equivalent to:</div></div><div class='texpara'><span class='codeblock'><span class='preprocessordirective'>#if</span> __has_embed<span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='literal'>0</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
120+
</span></div><div class='texpara'><div id='param.limit-2.sentence-2' class='sentence'>is equivalent to:</div></div><div class='texpara'><span class='codeblock'><span class='preprocessordirective'>#if</span> <span class='preprocessordirective'>__has_embed</span><span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='literal'>0</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
121121
<span class='preprocessordirective'>#endif</span>
122122
</span> —&nbsp;<i>end example</i>]</div></div></div><div class='texpara'><div id='param.limit-example-2' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#param.limit-example-2'>2</a></i>:&ensp;<span class='codeblock'><span class='preprocessordirective'>#</span>embed <span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='preprocessordirective'>__has_include</span><span class='parenthesis'>(</span><span class='literal'>"a.h"</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
123123

124-
<span class='preprocessordirective'>#if</span> __has_embed<span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='preprocessordirective'>__has_include</span><span class='parenthesis'>(</span><span class='literal'>"a.h"</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
124+
<span class='preprocessordirective'>#if</span> <span class='preprocessordirective'>__has_embed</span><span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span>data<span class='operator'>.</span>dat<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='preprocessordirective'>__has_include</span><span class='parenthesis'>(</span><span class='literal'>"a.h"</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span><span class='parenthesis'>)</span>
125125
<span class='comment'>// ill-formed: <span class='tcode_in_codeblock'>__has_<span class='shy'></span>include</span> (<a href='cpp.cond' title='15.2&emsp;Conditional inclusion'>[cpp.<span class='shy'></span>cond]</a>) cannot appear here</span>
126126
<span class='preprocessordirective'>#endif</span>
127127
</span> —&nbsp;<i>end example</i>]</div></div></div></div><div class='para' id='param.limit-3'><div class='marginalizedparent'><a class='marginalized' href='#param.limit-3'>3</a></div><div class='sourceLinkParent'><a class='sourceLink' href='https://github.com/cplusplus/draft/tree/9b8a5e51752efe9edd7a447e96ffab0f3313accc/source/preprocessor.tex#L1074'>#</a></div><div class='texpara'><div id='param.limit-3.sentence-1' class='sentence'>The <a href='expr.const#nt:constant-expression' title='7.7&emsp;Constant expressions&emsp;[expr.const]'><span id='ntref:constant-expression__'><span class='textsf'><i >constant-expression</i></span></span></a> shall be an integral constant expression
@@ -168,8 +168,8 @@
168168
expands to
169169
<span class='codeblock'><span class='literal'>42203</span>
170170
</span></div> —&nbsp;<i>end example</i>]</div></div></div><div class='texpara'><div id='param.if.empty-example-2' class='example'><div class='texpara'>[<i>Example&nbsp;<a href='#param.if.empty-example-2'>2</a></i>:&ensp;<div id='param.if.empty-2.sentence-6' class='sentence'>This resource is considered empty due to the <span class='texttt'>limit<span class='parenthesis'>(</span><span class='literal'>0</span><span class='parenthesis'>)</span></span> <a href='cpp.pre#nt:embed-parameter' title='15.1&emsp;Preamble&emsp;[cpp.pre]'><span id='ntref:embed-parameter_______'><span class='textsf'><i >embed-parameter</i></span></span></a>,
171-
always, including in <span class='texttt'>__has_<span class='shy'></span>embed</span> clauses<a class='hidden_link' href='#param.if.empty-2.sentence-6'>.</a></div></div><div class='texpara'><span class='codeblock'><span class='keyword'>int</span> infinity_zero <span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
172-
<span class='preprocessordirective'>#if</span> __has_embed<span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span><span class='operator'>/</span>owo<span class='operator'>/</span>uwurandom<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='literal'>0</span><span class='parenthesis'>)</span> prefix<span class='parenthesis'>(</span>some tokens<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> __STDC_EMBED_EMPTY__
171+
always, including in <span class='texttt'><span class='preprocessordirective'>__has_<span class='shy'></span>embed</span></span> clauses<a class='hidden_link' href='#param.if.empty-2.sentence-6'>.</a></div></div><div class='texpara'><span class='codeblock'><span class='keyword'>int</span> infinity_zero <span class='parenthesis'>(</span><span class='parenthesis'>)</span> <span class='curlybracket'>{</span>
172+
<span class='preprocessordirective'>#if</span> <span class='preprocessordirective'>__has_embed</span><span class='parenthesis'>(</span><span class='anglebracket'>&lt;</span><span class='operator'>/</span>owo<span class='operator'>/</span>uwurandom<span class='anglebracket'>&gt;</span> limit<span class='parenthesis'>(</span><span class='literal'>0</span><span class='parenthesis'>)</span> prefix<span class='parenthesis'>(</span>some tokens<span class='parenthesis'>)</span><span class='parenthesis'>)</span> <span class='operator'>=</span><span class='operator'>=</span> __STDC_EMBED_EMPTY__
173173
<span class='comment'>// if <span class='tcode_in_codeblock'>&lt;/owo/uwurandom&gt;</span> exists, this conditional inclusion branch is taken and the function returns <span class='tcode_in_codeblock'>0</span>.</span>
174174
<span class='keyword'>return</span> <span class='literal'>0</span>;
175175
<span class='preprocessordirective'>#else</span>

0 commit comments

Comments
 (0)