https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94082
--- Comment #6 from Deniz Bahadir <D.Bahadir at GMX dot de> --- (In reply to Jonathan Wakely from comment #5) > > It definitely doesn't mean __builtin_memcpy has to be used. It means "we > don't want to change std::memcpy, implementations must use some other method > to make it work". > > That could mean using some new intrinsic like __builtin_constant_memcpy, or > anything else that makes the algorithms work in constant expressions. The > solution in libstdc++ is based on std::is_constant_evaluted() and ensures > that memcpy and __builtin_memcpy are never needed in constant expressions > because we implement those copies by hand when needed during constant > evaluation. OK, I see. Would you then suggest GCC should provide such an intrinsic or would you expect developers to do copies by hand, too, in `constexpr` context. > > > It might be useful if it could be used, but the fact it can't currently > > > isn't a bug. > > > > OK, then consider this issue a feature-request and a question. > > > > As the link to Compiler Explorer shows the compiler is already able to > > calculate the result of the entire function call at compile-time when called > > from a non-`constexpr` context. > > For some cases. I don't think it's true for all inputs. Well, that is unfortunate.