C++ Logo

sg16

Advanced search

Re: User-defined compile time messages; P2741R0 and P2758R0

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Fri, 3 Feb 2023 20:22:45 +0100
On 03/02/2023 06.16, Tom Honermann via SG16 wrote:
> SG16 currently has two papers in its queue that seek to allow code evaluated in constant expression context to produce text to be displayed to a (compiler) user at compile time.
>
> * P2741R0 <https://wg21.link/p2741r0>: user-generated static_assert messages
> * P2758R0 <https://wg21.link/p2758r0>: Emitting messages at compile time
>
> JF is planning for EWG to review these in Issaquah. Since SG16 will not be meeting in Issaquah, our options are limited for providing recommendations prior to that initial EWG review. JF has asked that we conduct a review via mailing list to collect input prior to EWG's review. SG16 will still review post-Issaquah as we usually would in order to provide a recommendation for EWG to consider in a future telecon or in Varna.
>
> Please respond to this message with your thoughts on these papers before Monday, February 6th, if possible; I know that is short notice. I will plan to prepare a summary for EWG.

I notice that the paper contains to discussion of encoding concerns
at all.

A phase 7 string literal evaluated in a constant expression is
currently no different from such a string literal evaluated at
runtime, conceptually: Both are converted to the literal encoding
and considered as an array of integers, essentially.

I think the question of what exactly we'd like an implementation
to do with such compile-time string literals ending up in compiler
diagnostics should be discussed in the paper.

Thanks,
Jens

Received on 2023-02-03 19:22:57