Skip to content

Commit

Permalink
Ugh typo
Browse files Browse the repository at this point in the history
  • Loading branch information
brevzin committed Nov 3, 2024
1 parent f4efd36 commit 20da46d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions 2996_reflection/p2996r8.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="generator" content="mpark/wg21" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="dcterms.date" content="2024-10-29" />
<meta name="dcterms.date" content="2024-11-03" />
<title>Reflection for C++26</title>
<style>
code{white-space: pre-wrap;}
Expand Down Expand Up @@ -565,7 +565,7 @@ <h1 class="title" style="text-align:center">Reflection for C++26</h1>
</tr>
<tr>
<td>Date:</td>
<td>2024-10-29</td>
<td>2024-11-03</td>
</tr>
<tr>
<td style="vertical-align:top">Project:</td>
Expand Down Expand Up @@ -4906,8 +4906,8 @@ <h3 data-number="4.4.22" id="other-type-traits"><span class="header-section-numb
opposed to a function type), and the second would simply answer
<code class="sourceCode cpp"><span class="kw">false</span></code> for
the reflection of <em>any</em> type (function type or otherwise).</p>
<p>Moreover, in this case it’s actually import than the reflection query
<code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>is_function</code>
<p>Moreover, in this case it’s actually important that the reflection
query <code class="sourceCode cpp">std<span class="op">::</span>meta<span class="op">::</span>is_function</code>
does <em>not</em> return
<code class="sourceCode cpp"><span class="kw">true</span></code> for a
function type so that using
Expand Down
2 changes: 1 addition & 1 deletion 2996_reflection/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,7 @@ But this is no longer the case. Consider the name `is_function`. It could be:

Both of these are useful, yet they mean different things entirely - the first is ill-formed when passed a reflection of a function (as opposed to a function type), and the second would simply answer `false` for the reflection of _any_ type (function type or otherwise).

Moreover, in this case it's actually import than the reflection query `std::meta::is_function` does _not_ return `true` for a function type so that using `is_function` as a filter for `members_of` does the expected thing — only giving you back functions, rather than also types.
Moreover, in this case it's actually important that the reflection query `std::meta::is_function` does _not_ return `true` for a function type so that using `is_function` as a filter for `members_of` does the expected thing — only giving you back functions, rather than also types.

A similar kind of clash could occur with other functions — for instance, we don't have an `is_array(r)` right now that would check if `r` were the reflection of an array (as opposed to an array type), but we could in the future.

Expand Down

0 comments on commit 20da46d

Please sign in to comment.