相关疑难解决方法(0)

当list为空时,std :: list:begin()的行为

以下是否根据C++标准给出了定义的结果?

std::list<int> myList;
std::list<int>::iterator myIter = myList.begin();    // any issues?
myList.push_back( 123 );
myIter++;                                  // will myIter point to the 123 I pushed?
Run Code Online (Sandbox Code Playgroud)

我可以在我正在使用的编译器上测试它...但我想要一个更明确的答案.

c++ std

15
推荐指数
2
解决办法
1万
查看次数

标签 统计

c++ ×1

std ×1