Skip to content

P2758 R5 Emitting messages at compile time #1445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wg21bot opened this issue Jan 16, 2023 · 27 comments
Open

P2758 R5 Emitting messages at compile time #1445

wg21bot opened this issue Jan 16, 2023 · 27 comments
Assignees
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 CWG Core IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - medium paper size estimate
Milestone

Comments

@wg21bot
Copy link
Collaborator

wg21bot commented Jan 16, 2023

P2758R0 Emitting messages at compile time (Barry Revzin)

@tahonermann
Copy link
Collaborator

Since this paper has character encoding considerations, I'm going to schedule it for SG16 review.

@tahonermann tahonermann added the SG16 Text processing label Jan 20, 2023
@michaelbprice
Copy link

michaelbprice commented Feb 7, 2023

Relevant to https://isocpp.org/files/papers/P2758R0.html#improving-static_assert, see the previously discussed paper (which I authored) https://open-std.org/JTC1/SC22/WG21/docs/papers/2015/n4433.html and the corresponding EWG notes on the wiki from the Lenexa meeting.

Of note, it already contains potential wording, but was never reviewed by a Core expert and likely needs updating since we've done lots of character encoding work since then.

@erichkeane
Copy link
Collaborator

This was discussed in EWG during the February 8, 2023 afternoon session in Issaquah. The following polls were taken:

EWG would like to encourage more work on P2741R0 (static_assert-with-constexpr-message), solicit feedback from SG16, and see it again with core expert reviewed wording.

SF F N A SA
8 8 0 1 0

Result: Consensus

EWG would like to encourage more work on P2758 in the direction of constexpr_print_str/constexpr_error_str.

SF F N A SA
11 6 1 0 0

Result: Consensus

EWG ALSO would like to encourage more work on this topic that can print multiple errors per constant evaluation, but still result in a failed TU.

SF F N A SA
5 10 3 1 0

Result: Consensus

EWG would like to encourage more work on P2758 in the direction of a constexpr std::format.

SF F N A SA
13 4 1 0 0

Result: Consensus

@cor3ntin
Copy link

cor3ntin commented Jun 4, 2023

@tahonermann we can remove the SG16 tag from thar, right? SG16 guidance was given in #1434

@tahonermann
Copy link
Collaborator

@cor3ntin, the guidance provided in #1434 is clearly applicable, but I would prefer to see an updated paper that removes the duplication with P2741 and that has wording that implements that guidance first so that SG16 can definitively approve forwarding a specific revision.

@cor3ntin
Copy link

cor3ntin commented Jun 5, 2023

@tahonermann you are right, but i think we lost a needs-revision on this paper then.
@jfbastien you might want to ask barry whether he actually wants to present in Varna.

@cor3ntin cor3ntin added the needs-revision Paper needs changes before it can proceed label Jun 5, 2023
@jfbastien
Copy link
Collaborator

I checked with @brevzin, he says:

once SG16 is happy with arbitrary object, the rest of my paper just follows suit I think. Just need to drop the part that Corentin is covering.

So let's mark it as needing revision and track @cor3ntin 's paper first. Once @cor3ntin 's paper proceeds (or dies!) we can move this one accordingly.

@jfbastien jfbastien removed ewg-tuesday-pm SG16 Text processing labels Jun 9, 2023
@brevzin
Copy link
Collaborator

brevzin commented Jun 9, 2023

I checked with @brevzin, he says:

once SG16 is happy with arbitrary object, the rest of my paper just follows suit I think. Just need to drop the part that Corentin is covering.

So let's mark it as needing revision and track @cor3ntin 's paper first. Once @cor3ntin 's paper proceeds we can move this one accordingly.

Ahem. FTFY.

@tahonermann
Copy link
Collaborator

I'm going to retain the SG16 label for now. EWG can, and should, proceed with any review desired of course, but I want to run a new revision by SG16 since we haven't discussed the parts of the paper that are not covered by P2741 (user-generated static_assert messages).

@wg21bot
Copy link
Collaborator Author

wg21bot commented Dec 19, 2023

P2758R1 Emitting messages at compile time (Barry Revzin, )

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Dec 19, 2023
@wg21bot wg21bot modified the milestones: 2023-telecon, 2024-telecon Dec 19, 2023
@wg21bot wg21bot changed the title P2758 Emitting messages at compile time P2758 R1 Emitting messages at compile time Dec 19, 2023
@wg21bot
Copy link
Collaborator Author

wg21bot commented Feb 16, 2024

P2758R2 Emitting messages at compile time (Barry Revzin)

@inbal2l inbal2l added the LEWG Library Evolution label Jan 5, 2025
@wg21bot
Copy link
Collaborator Author

wg21bot commented Jan 14, 2025

P2758R4 Emitting messages at compile time (Barry Revzin)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Jan 14, 2025
@wg21bot wg21bot added this to the 2025-telecon milestone Jan 14, 2025
@wg21bot wg21bot changed the title P2758 R3 Emitting messages at compile time P2758 R4 Emitting messages at compile time Jan 14, 2025
@jensmaurer jensmaurer moved this from Awaiting updated wording to Waiting for subgroups in CWG Jan 14, 2025
@jensmaurer jensmaurer moved this from Waiting for subgroups to Ready for review in CWG Jan 14, 2025
@inbal2l inbal2l added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Jan 24, 2025
@inbal2l
Copy link
Collaborator

inbal2l commented Jan 29, 2025

2025-01-28 Library Evolution Telecon

P2758R4: Emitting messages at compile time

2025-01-28 Library Evolution Telecon Minutes

Champion: Barry Revzin
Chair: Inbal Levi
Minute Taker: Andreas Weis

Summary

POLL: We would like to rename the std::constexpr_print_str overloads to std::constexpr_debug_print_str.

SF F N A SA
1 1 10 7 0

Attendance: 31
Author's Position: N
Outcome: No consensus for a change

POLL: We would like to remove all the std::constexpr_print_str overloads from the proposal.

SF F N A SA
0 1 0 13 5

Attendance: 29
Author's Position: SA
Outcome: Consensus against

F: Implementation concerns in the current form

POLL: We would like to remove the std::constexpr_print_str(string_view) overload from the proposal (as we want to control marking it with tags)

SF F N A SA
1 3 4 3 7

Attendance: 29
Author's Position: SA
Outcome: Consensus against

POLL: We would like to explore alternative design for the interface currently proposed in P2758 (e.g. taking an enum with severity, or otherwise).

SF F N A SA
0 0 4 9 6

Attendance: 29
Author's Position: SA
Outcome: Strong consensus against

POLL: Make the interface described in P2758R4 “consteval” (by that eliminating them from working on run-time)

SF F N A SA
1 2 4 5 7

Attendance: 29
Author's Position: SA
Outcome: Consensus against

POLL: Forward P2758R4 to LWG (pending SG16’s approval)

SF F N A SA
12 11 1 0 0

Attendance: 28
Author's Position: SF
Outcome: Strong consensus in favor

Paper forwarding checklist:

  • Why should this facility go into the standard library? Usable at compile time
  • Examples? Yes
  • Field experience?
    • Implementation experience? Some
    • Usage experience? Some, within “reflection” and the standard lib
    • Deployment experience? No
  • Performance considerations? N/A
  • Constexpr? YES 🙂
  • Discussion of prior art? Yes
  • Changes Library Evolution previously requested? N/A (discussed on reflector prior to the meeting)
  • Support for "std::format", "hash", and allocators (if required)? N/A
  • Wording? Yes
  • Feature test macro? No (targets same vehicle as “Reflection”, if missed can be reconsidered)

Next Steps

Paper was forwarded to LWG, pending SG16 review of:

  1. Wording for restrictions on tag string and message string,
  2. Adding overloads accept a u8string_view.

@tahonermann please remove the SG16 lable after seen, so that LWG will know they can look at it. Thank you! :)

@inbal2l inbal2l added LWG Library lwg-pending LWG Chair needs to disposition and removed LEWG Library Evolution ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Jan 29, 2025
@JeffGarland JeffGarland removed the lwg-pending LWG Chair needs to disposition label Feb 7, 2025
@jensmaurer
Copy link
Member

CWG 2025-02-13 in Hagenberg: Assigned for pre-review.

Note: When are such messages emitted for constexpr/consteval destructors?

@jensmaurer jensmaurer moved this from Ready for review to Awaiting updated wording in CWG Feb 13, 2025
@inbal2l inbal2l added the B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 label Mar 14, 2025
@tahonermann
Copy link
Collaborator

SG16 reviewed P2758R4 during the 2025-02-05 SG16 meeting. The following polls were taken.

  • Poll 3: P2758R4: Add overloads that allow the message to be passed as std::u8string_view.
    • Attendees: 9 (two abstentions)
      SF F N A SA
      4 2 1 0 0
    • Consensus.
  • Poll 4: P2758R4: Add overloads that allow the message to be passed as std::wstring_view.
    • Attendees: 9 (two abstention)
      SF F N A SA
      0 2 2 2 1
    • No consensus.
    • A/SA: std::wstring_view is mostly useful on Windows at run-time, we don't really need it
      at compile-time.
  • Poll 5: P2758R4: Add overloads that allow the message to be passed as std::u16string_view and std::u32string_view.
    • Attendees: 9 (two abstention)
      SF F N A SA
      0 1 5 1 0
    • No consensus.
  • Poll 6: P2758R4: Forward to LEWG modified to include std::u8string_view overloads.
    • Attendees: 9 (two abstention)
      SF F N A SA
      3 4 0 0 0
    • Strong consensus.

SG16 asked for changes, so I'm adding the needs-revision label. The requested change to add support for std::u8string_view is important for reflection; without it, the standard library doesn't provide a way to print the message returned from std::meta::exception::what() at compile-time; see P3560R0 which is on track for C++26 per #2206.

I'll retain the SG16 label for now to confirm that SG16's request has been addressed once a new revision is submitted.

@inbal2l, @brevzin, see above.

@tahonermann tahonermann added the needs-revision Paper needs changes before it can proceed label Mar 16, 2025
@inbal2l
Copy link
Collaborator

inbal2l commented Mar 18, 2025

Thank you to SG16 for the valuable input!
Was forwarded to LWG (pending the approval of SG16). Assuming P2758R5 apply the requested changes (will be verified by SG16 chair and myself), no need for us to see this again. Also notified explicitly in the beginning of 2025-03-18 telecon.

@inbal2l inbal2l added lwg-pending LWG Chair needs to disposition and removed SG16 Text processing labels Mar 18, 2025
@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label Mar 19, 2025
@wg21bot
Copy link
Collaborator Author

wg21bot commented Mar 19, 2025

P2758R5 Emitting messages at compile time (Barry Revzin)

@wg21bot wg21bot changed the title P2758 R4 Emitting messages at compile time P2758 R5 Emitting messages at compile time Mar 19, 2025
@jensmaurer jensmaurer moved this from Awaiting updated wording to Ready for review in CWG Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 CWG Core IS Ship vehicle: IS LWG Library lwg-pending LWG Chair needs to disposition size - medium paper size estimate
Projects
Status: No status
Status: Ready for review
Development

No branches or pull requests