Skip to content

Commit

Permalink
More words
Browse files Browse the repository at this point in the history
  • Loading branch information
brevzin committed Jan 13, 2025
1 parent e660106 commit 96d5888
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
6 changes: 4 additions & 2 deletions 3394_annotations/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,12 @@ consteval vector<info> annotations_of(info item);
[#]{.pnum} *Returns*: A `vector` containing the following reflections:
* For each declaration `$D$` of the entity represented by `item` that is reachable from some point in the evaluation context ([expr.const]), in lexical order,
* For each `$annotation$` `$A$` in each `$attribute-specifier-seq$` appertaining to `$D$`, in lexical order,
* For each declaration `$D$` of the entity represented by `item` that precedes either some point in the evaluation context ([expr.const]) or a point immediately following the `$class-specifier$` of a class for which such a point is in a complete-class context,
* For each `$annotation$` `$A$` in each `$attribute-specifier-seq$` appertaining to `$D$`,
* A reflection `$R$` representing `$A$`, whose value is the result of the corresponding `$constant-expression$`.
For any two reflections `@*R*~1~@` and `@*R*~2~@` returned, if the annotation represented by `@*R*~1~@` precedes the annotation represented by `@*R*~2~@`, then `@*R*~1~@` is sequenced before `@*R*~2~@` in the returned `vector`.
::: example
```cpp
Expand Down
19 changes: 15 additions & 4 deletions 3394_annotations/p3394r1.html
Original file line number Diff line number Diff line change
Expand Up @@ -1608,18 +1608,29 @@ <h2 data-number="5.2" id="library"><span class="header-section-number">5.2</span
<ul>
<li>For each declaration <code class="sourceCode cpp"><em>D</em></code>
of the entity represented by <code class="sourceCode cpp">item</code>
that is reachable from some point in the evaluation context
([expr.const]), in lexical order,</li>
that precedes either some point in the evaluation context ([expr.const])
or a point immediately following the
<code class="sourceCode cpp"><em>class-specifier</em></code> of a class
for which such a point is in a complete-class context,</li>
<li>For each <code class="sourceCode cpp"><em>annotation</em></code>
<code class="sourceCode cpp"><em>A</em></code> in each
<code class="sourceCode cpp"><em>attribute-specifier-seq</em></code>
appertaining to <code class="sourceCode cpp"><em>D</em></code>, in
lexical order,</li>
appertaining to <code class="sourceCode cpp"><em>D</em></code>,</li>
<li>A reflection <code class="sourceCode cpp"><em>R</em></code>
representing <code class="sourceCode cpp"><em>A</em></code>, whose value
is the result of the corresponding
<code class="sourceCode cpp"><em>constant-expression</em></code>.</li>
</ul>
<p>For any two reflections
<code class="sourceCode cpp"><em>R</em><sub>1</sub></code> and
<code class="sourceCode cpp"><em>R</em><sub>2</sub></code> returned, if
the annotation represented by
<code class="sourceCode cpp"><em>R</em><sub>1</sub></code> precedes the
annotation represented by
<code class="sourceCode cpp"><em>R</em><sub>2</sub></code>, then
<code class="sourceCode cpp"><em>R</em><sub>1</sub></code> is sequenced
before <code class="sourceCode cpp"><em>R</em><sub>2</sub></code> in the
returned <code class="sourceCode cpp">vector</code>.</p>
<div class="example">
<span><em>Example 1:</em> </span>
<div class="sourceCode" id="cb33"><pre class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> Option <span class="op">{</span> <span class="dt">bool</span> value; <span class="op">}</span>;</span>
Expand Down

0 comments on commit 96d5888

Please sign in to comment.