You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0fdd650
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/dotnet/deque-stl-clr.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,7 +130,7 @@ template<typename Value>
130
130
## Remarks
131
131
The object allocates and frees storage for the sequence it controls through a stored array of handles that designate blocks of `Value` elements. The array grows on demand. Growth occurs in such a way that the cost of either prepending or appending a new element is constant time, and no remaining elements are disturbed. You can also remove an element at either end in constant time, and without disturbing remaining elements. Thus, a deque is a good candidate for the underlying container for template class [queue (STL/CLR)](../dotnet/queue-stl-clr.md) or template class [stack (STL/CLR)](../dotnet/stack-stl-clr.md).
132
132
133
-
A `deque` object supports random-access iterators, which means you can refer to an element directly given its numerical position, counting from zero for the first (front) element, to [deque::size (STL/CLR)](../dotnet/deque-size-stl-clr.md)`() - 1` for the last (back) element. It also means that a deque is a good candidate for the underlying container for template class [priority_queue (STL/CLR)](../dotnet/priority-queue-stl-clr.md).
133
+
A `deque` object supports random-access iterators, which means you can refer to an element directly given its numerical position, counting from zero for the first (front) element, to [deque::size (STL/CLR)](#size)`() - 1` for the last (back) element. It also means that a deque is a good candidate for the underlying container for template class [priority_queue (STL/CLR)](../dotnet/priority-queue-stl-clr.md).
134
134
135
135
A deque iterator stores a handle to its associated deque object, along with the bias of the element it designates. You can use iterators only with their associated container objects. The bias of a deque element is `not` necessarily the same as its position. The first element inserted has bias zero, the next appended element has bias 1, but the next prepended element has bias -1.
136
136
@@ -433,7 +433,7 @@ void clear();
433
433
```
434
434
435
435
### Remarks
436
-
The member function effectively calls [deque::erase (STL/CLR)](../dotnet/deque-erase-stl-clr.md)`(`[deque::begin (STL/CLR)](../dotnet/deque-begin-stl-clr.md)`(),`[deque::end (STL/CLR)](../dotnet/deque-end-stl-clr.md)`())`. You use it to ensure that the controlled sequence is empty.
436
+
The member function effectively calls [deque::erase (STL/CLR)](#erase)`(`[deque::begin (STL/CLR)](#begin)`(),`[deque::end (STL/CLR)](#end)`())`. You use it to ensure that the controlled sequence is empty.
initializes the controlled sequence with the sequence [`right.begin()`, `right.end()`). You use it to specify an initial controlled sequence that is a copy of the sequence controlled by the deque object `right`. For more information on the iterators, see [deque::begin (STL/CLR)](../dotnet/deque-begin-stl-clr.md) and [deque::end (STL/CLR)](../dotnet/deque-end-stl-clr.md).
649
+
initializes the controlled sequence with the sequence [`right.begin()`, `right.end()`). You use it to specify an initial controlled sequence that is a copy of the sequence controlled by the deque object `right`. For more information on the iterators, see [deque::begin (STL/CLR)](#begin) and [deque::end (STL/CLR)](#end).
650
650
651
651
The constructor:
652
652
@@ -809,7 +809,7 @@ bool empty();
809
809
```
810
810
811
811
### Remarks
812
-
The member function returns true for an empty controlled sequence. It is equivalent to [deque::size (STL/CLR)](../dotnet/deque-size-stl-clr.md)`() == 0`. You use it to test whether the deque is empty.
812
+
The member function returns true for an empty controlled sequence. It is equivalent to [deque::size (STL/CLR)](#size)`() == 0`. You use it to test whether the deque is empty.
The second member function removes the elements of the controlled sequence in the range [`first`, `last`). You use it to remove zero or more contiguous elements.
931
931
932
-
Both member functions return an iterator that designates the first element remaining beyond any elements removed, or [deque::end (STL/CLR)](../dotnet/deque-end-stl-clr.md)`()` if no such element exists.
932
+
Both member functions return an iterator that designates the first element remaining beyond any elements removed, or [deque::end (STL/CLR)](#end)`()` if no such element exists.
933
933
934
934
When erasing elements, the number of element copies is linear in the number of elements between the end of the erasure and the nearer end of the sequence. (When erasing one or more elements at either end of the sequence, no element copies occur.)
The member functions both ensure that [deque::size (STL/CLR)](../dotnet/deque-size-stl-clr.md)`()` henceforth returns `new_size`. If it must make the controlled sequence longer, the first member function appends elements with value `value_type()`, while the second member function appends elements with value `val`. To make the controlled sequence shorter, both member functions effectively erase the last element [deque::size (STL/CLR)](../dotnet/deque-size-stl-clr.md)`() -``new_size` times. You use it to ensure that the controlled sequence has size `new_size`, by either trimming or padding the current controlled sequence.
1939
+
The member functions both ensure that [deque::size (STL/CLR)](#size)`()` henceforth returns `new_size`. If it must make the controlled sequence longer, the first member function appends elements with value `value_type()`, while the second member function appends elements with value `val`. To make the controlled sequence shorter, both member functions effectively erase the last element [deque::size (STL/CLR)](#size)`() -``new_size` times. You use it to ensure that the controlled sequence has size `new_size`, by either trimming or padding the current controlled sequence.
1940
1940
1941
1941
### Example
1942
1942
@@ -2034,7 +2034,7 @@ size_type size();
2034
2034
```
2035
2035
2036
2036
### Remarks
2037
-
The member function returns the length of the controlled sequence. You use it to determine the number of elements currently in the controlled sequence. If all you care about is whether the sequence has nonzero size, see [deque::empty (STL/CLR)](../dotnet/deque-empty-stl-clr.md)`()`.
2037
+
The member function returns the length of the controlled sequence. You use it to determine the number of elements currently in the controlled sequence. If all you care about is whether the sequence has nonzero size, see [deque::empty (STL/CLR)](#empty)`()`.
0 commit comments