C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [P2758] Emitting messages at compile time

From: Barry Revzin <barry.revzin_at_[hidden]>
Date: Tue, 22 Oct 2024 12:46:56 -0500
On Wed, Oct 16, 2024 at 8:40 AM Aaron Ballman <aaron_at_[hidden]>
wrote:

> On Wed, Oct 16, 2024 at 6:10 AM Jonathan Wakely <cxx_at_[hidden]> wrote:
> >
> >
> >
> > On Tue, 15 Oct 2024 at 18:53, Aaron Ballman via SG15 <
> sg15_at_[hidden]> wrote:
> >>
> >> Thanks! FWIW, users do want this sort of capability, but the fact that
> >> no implementation has yet to add a feature with bells and whistles is
> >> because the problem is not easy to solve. I'm highly skeptical that
> >> this is something WG21 should be standardizing at all currently; it's
> >> firmly in the realm of QoI and different implementations have
> >> different needs (and our needs evolve over time). The only form of the
> >> feature I would consider supporting would be one that accepts the
> >> message to be printed during constant evaluation and nothing else.
> >> Anything with more bells and whistles will be problematic in practice.
> >>
> >> Practical implementability problems include:
> >> * Different implementations have different severities for diagnostics
> >> (error, warning, note, remark, no severity distinctions, etc)
> >
> >
> > We already have a distinction between #error and #warning, how is this
> any different?
> > constexpr_print just outputs a message at compile time (which you've
> said is fine).
>
> Because it adds another layer of distinction (constexpr_print_str)
> which may or may not make sense to any given implementation. In Clang
> specifically, is that a note or a remark? (There are problems with
> whichever one we pick, so it'd probably be an entirely new thing, but
> none of our users have actually asked for something like that, at
> least that I'm aware of.)
>

I've been thinking of how you expect me to respond to this, and I'm still
not entirely sure. You're not aware of ANY of your users having asked for
something like this? Not even the user who is asking for something like
this so hard that he wrote a paper, took it through several groups, and got
strong (nearly unanimous) consensus for its adoption?

Barry

Received on 2024-10-22 17:47:10