[Bug c++/94082] __builtin_memcpy in constexpr context should compile

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 9 09:45:59 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94082

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Deniz Bahadir from comment #1)
> Reading P0202 (wg21.link/p0202) (which made it into C++20) it sounds as if
> `__builtin_memcpy` should be usable from a `constexpr` context.

Why? std::memcpy isn't usable in constant expressions.

It might be useful if it could be used, but the fact it can't currently isn't a
bug.


More information about the Gcc-bugs mailing list