https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24928
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With -fimplicit-constexpr, GCC do the optimization, maybe this will become part of the C++ standard in the future ....
pinskia at gcc dot gnu.org via Gcc-bugs Sat, 25 Dec 2021 03:05:43 -0800
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24928
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With -fimplicit-constexpr, GCC do the optimization, maybe this will become part of the C++ standard in the future ....