https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121180
--- Comment #9 from Tomasz KamiĆski <tkaminsk at gcc dot gnu.org> --- > So it would make sense for std::any to avoid creating objects in itself when > this issue can arise. The situation when such issue can arise is dynamic condition, so this will entail disabling small object optimization entirely. I think the issue is an defect in the standard, as the standard is meant to allow SSO, and thus stored object to be nested withing any.
