https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85873
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Kimon.Hoffmann from comment #6) > The situation as it stands is unfortunate though, since the standard does > not allow "static constexpr" variables in constexpr functions. Therefor I > don't see a standards compliant way to: return a constant array from a > function (the choice of which array to return possibly depending on a > function argument) that: > * Provides type erasure on the length of the returned array. > * Works in constexpr contexts. > * Does not copy values during runtime. It does seem wrong that a constexpr function can't define a constexpr static local variable.