C++ STL advance 和next 区别

std::advance

  • modifies its argument
  • returns nothing
  • works on input iterators or better (or bi-directional iterators if a negative distance is given)

std::next

  • leaves its argument unmodified
  • returns a copy of the argument, advanced by the specified amount
  • works on forward iterators or better (or bi-directional iterators if a negative distance is given))

https://*.com/questions/15017065/whats-the-difference-between-stdadvance-and-stdnext

上一篇:【点宽专栏】华泰金工-CAPM择时(上)


下一篇:2021 MCM 数学建模美赛 C题第一问(全代码+解决思路)