splice() on std::list and iterator invalidation

前端 未结 3 1454
孤城傲影
孤城傲影 2020-12-11 02:21

The 3-argument form of list::splice() moves a single element from one list to the other. SGI\'s documentation explicitly states that all iterators, includi

3条回答
  •  被撕碎了的回忆
    2020-12-11 03:00

    Ok, this seems to be a defect in the standard, according to this and this link. It seems that "sticking the head in the sand" is a good strategy, since it will be fixed in new library versions.

提交回复
热议问题