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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
  // For heterogeneous types, allow memcpy between equal-sized integers.
  // N.B. we cannot do the same for equal-sized enums, they're not assignable.
  // We cannot do it for pointers, because derived-to-base can adjust offset.
  template<typename _Tp, typename _Up>
    struct __memcpyable<_Tp*, _Up*>
    {
      enum {
        __value = __memcpyable_integer<_Tp>::__width != 0
                    && ((int)__memcpyable_integer<_Tp>::__width
                          == (int)__memcpyable_integer<_Up>::__width)
      };
    };
Guess it needs to be 0 even if one but not both of _Tp and _Up is bool/const
bool.

Reply via email to