From Jason Turner

[deque.modifiers]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmplidfaouv/{from.md → to.md} +17 -11
tmp/tmplidfaouv/{from.md → to.md} RENAMED
@@ -7,12 +7,12 @@ iterator insert(const_iterator position, size_type n, const T& x);
7
  template <class InputIterator>
8
  iterator insert(const_iterator position,
9
  InputIterator first, InputIterator last);
10
  iterator insert(const_iterator position, initializer_list<T>);
11
 
12
- template <class... Args> void emplace_front(Args&&... args);
13
- template <class... Args> void emplace_back(Args&&... args);
14
  template <class... Args> iterator emplace(const_iterator position, Args&&... args);
15
  void push_front(const T& x);
16
  void push_front(T&& x);
17
  void push_back(const T& x);
18
  void push_back(T&& x);
@@ -37,25 +37,31 @@ a deque always takes constant time and causes a single call to a
37
  constructor of `T`.
38
 
39
  ``` cpp
40
  iterator erase(const_iterator position);
41
  iterator erase(const_iterator first, const_iterator last);
 
 
42
  ```
43
 
44
  *Effects:* An erase operation that erases the last element of a deque
45
  invalidates only the past-the-end iterator and all iterators and
46
  references to the erased elements. An erase operation that erases the
47
- first element of a deque but not the last element invalidates only the
48
- erased elements. An erase operation that erases neither the first
49
- element nor the last element of a deque invalidates the past-the-end
50
- iterator and all iterators and references to all the elements of the
51
- deque.
52
 
53
- *Complexity:* The number of calls to the destructor is the same as the
54
- number of elements erased, but the number of calls to the assignment
55
- operator is no more than the lesser of the number of elements before the
56
- erased elements and the number of elements after the erased elements.
 
 
 
 
57
 
58
  *Throws:* Nothing unless an exception is thrown by the copy constructor,
59
  move constructor, assignment operator, or move assignment operator of
60
  `T`.
61
 
 
7
  template <class InputIterator>
8
  iterator insert(const_iterator position,
9
  InputIterator first, InputIterator last);
10
  iterator insert(const_iterator position, initializer_list<T>);
11
 
12
+ template <class... Args> reference emplace_front(Args&&... args);
13
+ template <class... Args> reference emplace_back(Args&&... args);
14
  template <class... Args> iterator emplace(const_iterator position, Args&&... args);
15
  void push_front(const T& x);
16
  void push_front(T&& x);
17
  void push_back(const T& x);
18
  void push_back(T&& x);
 
37
  constructor of `T`.
38
 
39
  ``` cpp
40
  iterator erase(const_iterator position);
41
  iterator erase(const_iterator first, const_iterator last);
42
+ void pop_front();
43
+ void pop_back();
44
  ```
45
 
46
  *Effects:* An erase operation that erases the last element of a deque
47
  invalidates only the past-the-end iterator and all iterators and
48
  references to the erased elements. An erase operation that erases the
49
+ first element of a deque but not the last element invalidates only
50
+ iterators and references to the erased elements. An erase operation that
51
+ erases neither the first element nor the last element of a deque
52
+ invalidates the past-the-end iterator and all iterators and references
53
+ to all the elements of the deque.
54
 
55
+ [*Note 1*: `pop_front` and `pop_back` are erase
56
+ operations. *end note*]
57
+
58
+ *Complexity:* The number of calls to the destructor of `T` is the same
59
+ as the number of elements erased, but the number of calls to the
60
+ assignment operator of `T` is no more than the lesser of the number of
61
+ elements before the erased elements and the number of elements after the
62
+ erased elements.
63
 
64
  *Throws:* Nothing unless an exception is thrown by the copy constructor,
65
  move constructor, assignment operator, or move assignment operator of
66
  `T`.
67