summaryrefslogtreecommitdiff
path: root/9p33.cpp
diff options
context:
space:
mode:
Diffstat (limited to '9p33.cpp')
-rw-r--r--9p33.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/9p33.cpp b/9p33.cpp
index d99433c..d677d6e 100644
--- a/9p33.cpp
+++ b/9p33.cpp
@@ -1,4 +1,4 @@
-#include <iostream>
+#include <vector>
/*
*
@@ -9,6 +9,17 @@
int main () {
-
+ /*
+ Iterator invalid. Undefined behavior.
+ */
+
+ std::vector<int> v{1, 2, 3, 4, 5};
+
+ auto begin = v.begin();
+ while (begin != v.end()) {
+ ++begin;
+ v.insert(begin, 42);
+ ++begin;
+ }
return 0;
}