[Bug libstdc++/93872] [10 Regression] std::move(first, last, out) with a move-only value type fails to compile with -std=c++2a

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 24 18:50:00 GMT 2020


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We have:

  template<bool _IsMove>
    struct __copy_move<_IsMove, true, random_access_iterator_tag>
    {
      template<typename _Tp>
        _GLIBCXX20_CONSTEXPR
        static _Tp*
        __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result)
        {

and:

  template<bool _IsMove, typename _Tp>
    _GLIBCXX14_CONSTEXPR
    inline void*
    __memmove(_Tp* __dst, const _Tp* __src, size_t __num)

which use a const source, so can never move.


More information about the Gcc-bugs mailing list