https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111511

--- Comment #5 from Jiang An <de34 at live dot cn> ---
(In reply to m.cencora from comment #2)
> (In reply to Jonathan Wakely from comment #1)
> > (In reply to Jiang An from comment #0)
> > > Not sure whether this should be WONTFIX since the implementation is
> > > fundamentally changed in GCC 14 (PR 110167).
> > 
> > There's no reason we can't fix the old version in the release branches.
> > 
> > I did notice this when rewriting it, but I didn't think to change the
> > branches to avoid ADL there, because I plan to backport the new
> > implementation eventually anyway.
> 
> On a semi-related topic:
> Can't we use __builtin_bit_cast as even simpler implementation of to_array
> for trivial types?

__builtin_bit_cast results in constant evaluation failure when the element type
is or contains a pointer or a union, which heavily restricts its usability in
to_array.

Reply via email to