|
4242 | 4242 | \begin{itemdescr}
|
4243 | 4243 | \pnum
|
4244 | 4244 | Given a program point $P$,
|
4245 |
| -let \tcode{\exposid{eval-point}(P)} be the following program point: |
| 4245 | +let \tcode{\exposid{eval-point}($P$)} be the following program point: |
4246 | 4246 | \begin{itemize}
|
4247 | 4247 | \item
|
4248 | 4248 | If a potentially-evaluated subexpression\iref{intro.execution}
|
|
4567 | 4567 | \pnum
|
4568 | 4568 | \returns
|
4569 | 4569 | \tcode{true} if \tcode{is_accessible($R$, ctx)} is \tcode{false}
|
4570 |
| -for any $R$ in \tcode{bases_of(\brk{}r, access_context\brk{}::unchecked())}. |
| 4570 | +for any $R$ in \tcode{bases_of(\brk{}r, access_context::\brk{}unchecked())}. |
4571 | 4571 | Otherwise, \tcode{false}.
|
4572 | 4572 | \end{itemdescr}
|
4573 | 4573 |
|
|
5102 | 5102 | \effects
|
5103 | 5103 | Equivalent to:
|
5104 | 5104 | \begin{codeblock}
|
5105 |
| -%FIXME: this is inconsistent with reflect_constant, |
5106 |
| -%which uses if constexpr, |
5107 |
| -%and presumably, we could do the same here, with the same semantics. |
5108 |
| -if (is_reference_type(^^T)) { |
| 5105 | +if constexpr (is_reference_type(^^T)) { |
5109 | 5106 | return @\exposid{extract-ref}@<T>(r);
|
5110 | 5107 | } else if constexpr (is_nonstatic_data_member(r) || is_function(r)) {
|
5111 |
| - return @\exposid{extract-member-or-function}@<T>(r); |
| 5108 | + return @\exposid{extract-member-or-function}@<U>(r); |
5112 | 5109 | } else {
|
5113 |
| - return @\exposid{extract-value}@<T>(constant_of(r)); |
| 5110 | + return @\exposid{extract-value}@<U>(constant_of(r)); |
5114 | 5111 | }
|
5115 | 5112 | \end{codeblock}
|
5116 | 5113 | \end{itemdescr}
|
|
5219 | 5216 | \indexlibraryglobal{reflect_constant}%
|
5220 | 5217 | \begin{itemdecl}
|
5221 | 5218 | template<class T>
|
5222 |
| - consteval info reflect_constant(T expr); // \expos |
| 5219 | + consteval info reflect_constant(T expr); |
5223 | 5220 | \end{itemdecl}
|
5224 | 5221 |
|
5225 | 5222 | \begin{itemdescr}
|
|
5271 | 5268 | static_assert(r2 == template_arguments_of(^^A<N{42}>)[0]);
|
5272 | 5269 |
|
5273 | 5270 | constexpr info r3 = reflect_constant(K{nullptr}); // OK
|
5274 |
| -constexpr info r4 = reflect_constant(K{"ebab"}); // error: constituent pointer points to string literal |
| 5271 | +constexpr info r4 = reflect_constant(K{"ebab"}); // error: constituent pointer |
| 5272 | + // points to string literal |
5275 | 5273 | \end{codeblock}
|
5276 | 5274 | \end{example}
|
5277 | 5275 | \end{itemdescr}
|
|
0 commit comments