[Bug libstdc++/105995] QoI: constexpr basic_string variable must use all of its SSO buffer

de34 at live dot cn gcc-bugzilla@gcc.gnu.org
Thu Jun 16 07:41:43 GMT 2022


--- Comment #2 from Jiang An <de34 at live dot cn> ---
(In reply to Andrew Pinski from comment #1)
> C++20 supports dynamic allocation for constexpr.

Yeah, but a constexpr variable can't hold dynamically allocated memory.
Dynamically allocated memory must be deallocated within its initialization.

More information about the Gcc-bugs mailing list