forked from Mooophy/Cpp-Primer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex9_32.cpp
More file actions
20 lines (19 loc) · 681 Bytes
/
Copy pathex9_32.cpp
File metadata and controls
20 lines (19 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//
// ex9_32.cpp
// Exercise 9.32
//
// Created by pezy on 12/3/14.
//
// @Brief In the program on page 354 would it be legal to write the call to insert as follows?
// If not, why not?
// iter = vi.insert(iter, *iter++);
// @Answer the statement is illegal, because as said in Standard [5.2.2] :
// "The order of evaluation of arguments is unspecified."
// As a result, after entering function insert,
// iter could be its original value or original value + 1 or even anything else,
// depending on how compiler implemented.
// @Discuss https://github.com/Mooophy/Cpp-Primer/issues/125
int main()
{
return 0;
}