C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow assert in constexpr functions

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Thu, 27 Mar 2025 15:41:45 +0000
On Thu, 27 Mar 2025 at 14:44, Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Thursday, 27 March 2025 03:56:58 Pacific Daylight Time Frederick
> Virchanza
> Gotham via Std-Proposals wrote:
> > Not to sound too farcical, but that diagnostic message can be fixed if
> > you pipe g++ (or clang) into 'sed' at the command line as follows:
> >
> > g++ -o prog main.cpp | sed 's/call to
> > non-\xe2\x80\x98constexpr\xe2\x80\x99 function \xe2\x80\x98void
> > __assert_fail\x28const char\*, const char\*, unsigned int, const
> > char\*\x29\xe2\x80\x99/Assertion failed in constant-evaluated
> > context/g'
>

Now try with a different $LANG in your env.


>
> Then submit a request for improvement for your toolchain.
>

Don't bother: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119497

Received on 2025-03-27 15:42:01