Home  >  Q&A  >  body text

C++的algorithm源码_Unchecked和_Rechecked的作用是什么呢?

// TEMPLATE FUNCTION _Unchecked
template<class _Iter> inline
    _Iter _Unchecked(_Iter _Src)
    {    // construct unchecked from checked, generic
    return (_Src);
    }

        // TEMPLATE FUNCTION _Rechecked
template<class _Iter,
    class _UIter> inline
    _Iter& _Rechecked(_Iter& _Dest, _UIter _Src)
    {    // reset checked from unchecked, generic
    _Dest = _Src;
    return (_Dest);
    }

它们的作用是什么?没看懂。

怪我咯怪我咯2714 days ago543

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-17 15:04:06

    https://stackoverflow.com/que...

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 15:04:06

    Sorry. Just looking at this code snippet, I really don’t know what it means.

    I personally think that you should bring this into some practical application scenarios for analysis. Although it is a template, because the template is abstract. If you can bring in specific examples, I think it should be easier to understand.

    reply
    0
  • Cancelreply