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

--- Comment #5 from biggs at biggs dot xyz ---
(In reply to Andrew Pinski from comment #4)
> (In reply to biggs from comment #3)
> > 
> > The unused names are optimized out here and string_view is simply a
> > contiguous array of characters not pointers.
> 
> Nope, it is still an array of pointers (and lengths) pointer.
> 
>     static const struct array names = {._M_elems={{._M_len=3, ._M_str=(const
> char *) "RED"}, {._M_len=5, ._M_str=(const char *) "GREEN"}, {._M_len=4,
> ._M_str=(const char *) "BLUE"}}};

So the argument here is that C23's constexpr does not permit this optimization
because it does not allow constexpr pointers other than nullptr?

Reply via email to