Skip to content

Commit d425880

Browse files
committed
Update paper
1 parent 520b2b5 commit d425880

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

papers/p3070.bs

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<pre class='metadata'>
22
Title: Formatting enums
33
Shortname: P3070
4-
Revision: 3
4+
Revision: 4
55
Audience: LEWG
66
Status: D
77
Group: WG21
88
URL:
99
Editor: Victor Zverovich, victor.zverovich@gmail.com
1010
No abstract: true
11-
Date: 2025-02-16
11+
Date: 2025-06-16
1212
Markup Shorthands: markdown yes
1313
</pre>
1414

@@ -44,6 +44,13 @@ aims to introduce a more streamlined method for defining custom formatters for
4444
enums. When formatting enums as integers, this approach is more efficient than
4545
using a `formatter` specialization.
4646

47+
# Changes since R3 # {#changes3}
48+
49+
- Move "The meaning of `format_as` is established as-if by performing
50+
argument-dependent lookup only ([basic.lookup.argdep](
51+
https://eel.is/c++draft/basic.lookup.argdep))." to [[contents](
52+
https://eel.is/c++draft/format.arg)] per feedback from Jonathan Wakely.
53+
4754
# Changes since R2 # {#changes2}
4855

4956
- Added wording to ensure that `format_as` is only considered if found by ADL
@@ -238,6 +245,22 @@ a common use case in `std::format`.
238245
<!-- Disabling implicit conversions would make enums::format_as not work
239246
and therefore not proposed. -->
240247

248+
Modify [[contents](https://eel.is/c++draft/format.arg)]:
249+
250+
...
251+
252+
The meaning of the unqualified name `swap` is established in an overload
253+
resolution context for swappable values (\[swappable.requirements\]). The
254+
meanings of the unqualified names `make_error_code`, `make_error_condition`,
255+
`from_stream`, and `submdspan_mapping` are established as-if by performing
256+
argument-dependent lookup (\[basic.lookup.argdep\]).
257+
258+
<ins>
259+
The meaning of `format_as` is established as-if by performing
260+
argument-dependent lookup only ([basic.lookup.argdep](
261+
https://eel.is/c++draft/basic.lookup.argdep)).
262+
</ins>
263+
241264
Modify [[format.arg](https://eel.is/c++draft/format.arg)]:
242265

243266
```
@@ -256,9 +279,7 @@ https://eel.is/c++draft/defns.ntcts)]).
256279
<ins>
257280
If `format_as(v)` is a valid expression and `TD` is a class or enumeration type,
258281
let `u` be `format_as(v)` and `U` be `remove_cvref_t<decltype(u)>`.
259-
Otherwise, let `u` be `v` and `U` be `TD`. Throughout this clause, the meaning
260-
of `format_as` is established as-if by performing argument-dependent lookup only
261-
([basic.lookup.argdep](https://eel.is/c++draft/basic.lookup.argdep)).
282+
Otherwise, let `u` be `v` and `U` be `TD`.
262283
</ins>
263284

264285
- If <code><del>TD</del><ins>U</ins></code> is `bool` or `char_type`, initializes
@@ -334,9 +355,7 @@ https://eel.is/c++draft/format.string.std)].
334355

335356
<ins>
336357
Let *format-as-type*`<T>` for type `T` be
337-
`remove_cvref_t<decltype(format_as(declval<const T&>()))>` where the meaning
338-
of `format_as` is established as-if by performing argument-dependent lookup only
339-
([basic.lookup.argdep](https://eel.is/c++draft/basic.lookup.argdep)).
358+
`remove_cvref_t<decltype(format_as(declval<const T&>()))>`.
340359
Each header that declares the template `formatter` provides the following
341360
enabled specialization:
342361
</ins>

0 commit comments

Comments
 (0)