Skip to content

Commit 59ed4f6

Browse files
author
mikeblome
committed
reverted code example to original version
1 parent 8899752 commit 59ed4f6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/standard-library/debug-iterator-support.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,12 @@ struct derived : base {
151151
~derived() {}
152152
};
153153

154-
int main() {
155-
auto vect = std::vector<int>(10);
156-
auto sink = new auto(std::begin(vect));
157-
::operator delete(sink); // frees the memory without calling ~iterator()
158-
} // access violation
154+
int main() {
155+
std::vector<int> vect( 10 );
156+
base * pb = new derived( vect.begin() );
157+
delete pb; // doesn't call ~derived()
158+
// access violation
159+
}
159160
```
160161
161162
## See also

0 commit comments

Comments
 (0)