https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81000
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Component|libstdc++ |c++
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't think there's anything wrong with std::any, Clang produces the same
result when using std::any from libstdc++. So the difference is in the
compiler, not the library implementation.