|
| 1 | +<?xml version='1.0' encoding='utf-8' standalone='no'?> |
| 2 | +<!DOCTYPE issue SYSTEM "lwg-issue.dtd"> |
| 3 | + |
| 4 | +<issue num="4442" status="New"> |
| 5 | +<title>Clarify `expr` and `fn` for `meta::reflect_object` and `meta::reflect_function`</title> |
| 6 | +<section> |
| 7 | +<sref ref="[meta.reflection.result]"/> |
| 8 | +</section> |
| 9 | +<submitter>Tomasz Kamiński</submitter> |
| 10 | +<date>04 Nov 2025</date> |
| 11 | +<priority>99</priority> |
| 12 | + |
| 13 | +<discussion> |
| 14 | +<b>Addresses <a href="https://github.com/cplusplus/nbballot/issues/748">US 118-179</a></b> |
| 15 | +<p>This should talk about the object/function designated by `expr`/`fn`, rather than `expr`/`fn`.</p> |
| 16 | +</discussion> |
| 17 | + |
| 18 | +<resolution> |
| 19 | +<p> |
| 20 | +This wording is relative to <paper num="N5014"/>. |
| 21 | +</p> |
| 22 | + |
| 23 | +<ol> |
| 24 | + |
| 25 | +<li><p>Modify <sref ref="[meta.reflection.result]"/> as indicated:</p> |
| 26 | + |
| 27 | +<pre> |
| 28 | +template<class T> |
| 29 | + consteval info reflect_object(T& expr); |
| 30 | +</pre> |
| 31 | +<blockquote> |
| 32 | +<p>-7- <i>Mandates</i>: `T` is an object type.</p> |
| 33 | +<p>-8- <i>Returns</i>: A reflection of the object designated by `expr`.</p> |
| 34 | +<p>-9- <i>Throws</i>: `meta::exception` |
| 35 | +<ins>if for an lvalue constant expression `E` that computes the object that `expr` refers to, `E`</ins> |
| 36 | +<del>unless `expr`</del> is <ins>not</ins> suitable for use as a constant template argument |
| 37 | +for a constant template parameter of type <tt>T&</tt> (<sref ref="[temp.arg.nontype]"/>).</p> |
| 38 | +</blockquote> |
| 39 | + |
| 40 | +<pre> |
| 41 | +template<class T> |
| 42 | + consteval info reflect_function(T& expr); |
| 43 | +</pre> |
| 44 | +<blockquote> |
| 45 | +<p>-10- <i>Mandates</i>: `T` is an function type.</p> |
| 46 | +<p>-11- <i>Returns</i>: A reflection of the function designated by `fn`.</p> |
| 47 | +<p>-12- <i>Throws</i>: `meta::exception` |
| 48 | +<ins>if for an lvalue constant expression `F` that computes the function that `fn` refers to, `F`</ins> |
| 49 | +<del>unless `fn`</del> is <ins>not</ins> suitable for use as a constant template argument |
| 50 | +for a constant template parameter of type <tt>T&</tt> (<sref ref="[temp.arg.nontype]"/>).</p> |
| 51 | +</blockquote> |
| 52 | + |
| 53 | +</li> |
| 54 | + |
| 55 | +</ol> |
| 56 | + |
| 57 | +</resolution> |
| 58 | + |
| 59 | +</issue> |
0 commit comments