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 0e46167
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/standard-library/pointer-to-unary-function-class.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,19 @@ public:
31
31
32
32
### Parameters
33
33
34
-
`pfunc`
34
+
*pfunc*
35
35
The binary function to be converted.
36
36
37
-
`left`
37
+
*left*
38
38
The object that the *\*pfunc* is called on.
39
39
40
40
## Return Value
41
41
42
-
The template class stores a copy of **pfunc**. It defines its member function `operator()` as returning (\***pfunc**)(_*Left*).
42
+
The template class stores a copy of `pfunc`. It defines its member function `operator()` as returning (\***pfunc**)(_*Left*).
43
43
44
44
## Remarks
45
45
46
-
A unary function pointer is a function object and may be passed to any C++ Standard Library algorithm that is expecting a unary function as a parameter, but it is not adaptable. To use it with an adaptor, such as binding a value to it or using it with a negator, it must be supplied with the nested types **argument_type** and **result_type** that make such an adaptation possible. The conversion by `pointer_to_unary_function` allows the function adaptors to work with binary function pointers.
46
+
A unary function pointer is a function object and may be passed to any C++ Standard Library algorithm that is expecting a unary function as a parameter, but it is not adaptable. To use it with an adaptor, such as binding a value to it or using it with a negator, it must be supplied with the nested types `argument_type` and `result_type` that make such an adaptation possible. The conversion by `pointer_to_unary_function` allows the function adaptors to work with binary function pointers.
Copy file name to clipboardExpand all lines: docs/standard-library/priority-queue-class.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,17 +28,17 @@ class priority_queue
28
28
*Type*
29
29
The element data type to be stored in the priority_queue.
30
30
31
-
`Container`
31
+
*Container*
32
32
The type of the underlying container used to implement the priority_queue.
33
33
34
34
*Compare*
35
35
The type that provides a function object that can compare two element values as sort keys to determine their relative order in the priority_queue. This argument is optional and the binary predicate **less***\<***typename** *Container***::value_type***>* is the default value.
36
36
37
37
## Remarks
38
38
39
-
The elements of class **Type** stipulated in the first template parameter of a queue object are synonymous with [value_type](#value_type) and must match the type of element in the underlying container class **Container** stipulated by the second template parameter. The **Type** must be assignable, so that it is possible to copy objects of that type and to assign values to variables of that type.
39
+
The elements of class `Type` stipulated in the first template parameter of a queue object are synonymous with [value_type](#value_type) and must match the type of element in the underlying container class `Container` stipulated by the second template parameter. The `Type` must be assignable, so that it is possible to copy objects of that type and to assign values to variables of that type.
40
40
41
-
The priority_queue orders the sequence it controls by calling a stored function object of class **Traits**. In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they are equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense.
41
+
The priority_queue orders the sequence it controls by calling a stored function object of class `Traits`. In general, the elements need be merely less than comparable to establish this order: so that, given any two elements, it may be determined either that they are equivalent (in the sense that neither is less than the other) or that one is less than the other. This results in an ordering between the nonequivalent elements. On a more technical note, the comparison function is a binary predicate that induces a strict weak ordering in the standard mathematical sense.
42
42
43
43
Suitable underlying container classes for priority_queue include [deque Class](../standard-library/deque-class.md) and the default [vector Class](../standard-library/vector-class.md) or any other sequence container that supports the operations of `front`, `push_back`, and `pop_back` and a random-access iterator. The underlying container class is encapsulated within the container adaptor, which exposes only the limited set of the sequence container member functions as a public interface.
The comparison function of type **constTraits** used to order the elements in the priority_queue, which defaults to compare function of the base container.
232
232
233
-
`_Cont`
233
+
*_Cont*
234
234
The base container of which the constructed priority_queue is to be a copy.
235
235
236
-
`right`
236
+
*right*
237
237
The priority_queue of which the constructed set is to be a copy.
238
238
239
-
`first`
239
+
*first*
240
240
The position of the first element in the range of elements to be copied.
241
241
242
-
`last`
242
+
*last*
243
243
The position of the first element beyond the range of elements to be copied.
244
244
245
245
### Remarks
246
246
247
-
Each of the first three constructors specifies an empty initial priority_queue, the second also specifying the type of comparison function (`comp`) to be used in establishing the order of the elements and the third explicitly specifying the `container_type` (`_Cont`) to be used. The keyword **explicit** suppresses certain kinds of automatic type conversion.
247
+
Each of the first three constructors specifies an empty initial priority_queue, the second also specifying the type of comparison function (`comp`) to be used in establishing the order of the elements and the third explicitly specifying the `container_type` (`_Cont`) to be used. The keyword **explicit** suppresses certain kinds of automatic type conversion.
248
248
249
-
The fourth constructor specifies a copy of the priority_queue `right`.
249
+
The fourth constructor specifies a copy of the priority_queue *right*.
250
250
251
251
The last three constructors copy the range [ * first, last*) of some container and use the values to initialize a priority_queue with increasing explicitness in specifying the type of comparison function of class **Traits** and `container_type`.
252
252
@@ -371,7 +371,7 @@ void push(const Type& val);
371
371
372
372
### Parameters
373
373
374
-
`val`
374
+
*val*
375
375
The element added to the top of the priority_queue.
376
376
377
377
### Remarks
@@ -477,7 +477,7 @@ const_reference top() const;
477
477
478
478
### Return Value
479
479
480
-
A reference to the largest element, as determined by the **Traits** function, object of the priority_queue.
480
+
A reference to the largest element, as determined by the `Traits` function, object of the priority_queue.
@@ -186,11 +186,11 @@ If [set_exception](#set_exception), [set_exception_at_thread_exit](#set_exceptio
186
186
187
187
As a result of this method, any threads that are blocked on the associated asynchronous state become unblocked.
188
188
189
-
The first method also throws any exception that is thrown when `Val` is copied into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
189
+
The first method also throws any exception that is thrown when *Val* is copied into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
190
190
191
-
The second method also throws any exception that is thrown when `Val` is moved into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
191
+
The second method also throws any exception that is thrown when *Val* is moved into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
192
192
193
-
For the partial specialization `promise<Ty&>`, the stored value is in effect a reference to `Val`.
193
+
For the partial specialization `promise<Ty&>`, the stored value is in effect a reference to *Val*.
194
194
195
195
For the specialization `promise<void>`, no stored value exists.
@@ -218,11 +218,11 @@ If [set_exception](#set_exception), [set_exception_at_thread_exit](#set_exceptio
218
218
219
219
In contrast to `set_value`, the associated asynchronous state is not set to ready until after all thread-local objects in the current thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state are not unblocked until the current thread exits.
220
220
221
-
The first method also throws any exception that is thrown when `Val` is copied into the associated asynchronous state.
221
+
The first method also throws any exception that is thrown when *Val* is copied into the associated asynchronous state.
222
222
223
-
The second method also throws any exception that is thrown when `Val` is moved into the associated asynchronous state.
223
+
The second method also throws any exception that is thrown when *Val* is moved into the associated asynchronous state.
224
224
225
-
For the partial specialization `promise<Ty&>`, the stored value is effectively a reference to `Val`.
225
+
For the partial specialization `promise<Ty&>`, the stored value is effectively a reference to *Val*.
226
226
227
227
For the specialization `promise<void>`, no stored value exists.
Copy file name to clipboardExpand all lines: docs/standard-library/queue-class.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,16 @@ class queue
28
28
*Type*
29
29
The element data type to be stored in the queue
30
30
31
-
`Container`
31
+
*Container*
32
32
The type of the underlying container used to implement the queue.
33
33
34
34
## Remarks
35
35
36
-
The elements of class **Type** stipulated in the first template parameter of a queue object are synonymous with [value_type](#value_type) and must match the type of element in the underlying container class **Container** stipulated by the second template parameter. The **Type** must be assignable, so that it is possible to copy objects of that type and to assign values to variables of that type.
36
+
The elements of class `Type` stipulated in the first template parameter of a queue object are synonymous with [value_type](#value_type) and must match the type of element in the underlying container class `Container` stipulated by the second template parameter. The `Type` must be assignable, so that it is possible to copy objects of that type and to assign values to variables of that type.
37
37
38
-
Suitable underlying container classes for queue include [deque](../standard-library/deque-class.md) and [list](../standard-library/list-class.md), or any other sequence container that supports the operations of `front`, **back**, `push_back`, and `pop_front`. The underlying container class is encapsulated within the container adaptor, which exposes only the limited set of the sequence container member functions as a public interface.
38
+
Suitable underlying container classes for queue include [deque](../standard-library/deque-class.md) and [list](../standard-library/list-class.md), or any other sequence container that supports the operations of `front`, `back`, `push_back`, and `pop_front`. The underlying container class is encapsulated within the container adaptor, which exposes only the limited set of the sequence container member functions as a public interface.
39
39
40
-
The queue objects are equality comparable if and only if the elements of class **Type** are equality comparable, and are less-than comparable if and only if the elements of class **Type** are less-than comparable.
40
+
The queue objects are equality comparable if and only if the elements of class `Type` are equality comparable, and are less-than comparable if and only if the elements of class `Type` are less-than comparable.
41
41
42
42
There are three types of container adaptors defined by the C++ Standard Library: stack, queue, and priority_queue. Each restricts the functionality of some underlying container class to provide a precisely controlled interface to a standard data structure.
43
43
@@ -94,7 +94,7 @@ The last element of the queue. If the queue is empty, the return value is undefi
94
94
95
95
### Remarks
96
96
97
-
If the return value of **back** is assigned to a `const_reference`, the queue object cannot be modified. If the return value of **back** is assigned to a **reference**, the queue object can be modified.
97
+
If the return value of `back` is assigned to a `const_reference`, the queue object cannot be modified. If the return value of `back` is assigned to a `reference`, the queue object can be modified.
98
98
99
99
When compiled by using [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md) defined as 1 or 2, a runtime error will occur if you attempt to access an element in an empty queue. See [Checked Iterators](../standard-library/checked-iterators.md) for more information.
100
100
@@ -204,9 +204,9 @@ The first element of the queue. If the queue is empty, the return value is undef
204
204
205
205
### Remarks
206
206
207
-
If the return value of `front` is assigned to a `const_reference`, the queue object cannot be modified. If the return value of `front` is assigned to a **reference**, the queue object can be modified.
207
+
If the return value of `front` is assigned to a `const_reference`, the queue object cannot be modified. If the return value of `front` is assigned to a `reference`, the queue object can be modified.
208
208
209
-
The member function returns a **reference** to the first element of the controlled sequence, which must be nonempty.
209
+
The member function returns a `reference` to the first element of the controlled sequence, which must be nonempty.
210
210
211
211
When compiled by using [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md) defined as 1 or 2, a runtime error will occur if you attempt to access an element in an empty queue. See [Checked Iterators](../standard-library/checked-iterators.md) for more information.
Copy file name to clipboardExpand all lines: docs/standard-library/random-access-iterator-tag-struct.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.workload: ["cplusplus"]
14
14
---
15
15
# random_access_iterator_tag Struct
16
16
17
-
A class that provides a return type for **iterator_category** function that represents a random-access iterator.
17
+
A class that provides a return type for `iterator_category` function that represents a random-access iterator.
18
18
19
19
## Syntax
20
20
@@ -26,7 +26,7 @@ struct random_access_iterator_tag : public bidirectional_iterator_tag {};
26
26
27
27
The category tag classes are used as compile tags for algorithm selection. The template function needs to find the most specific category of its iterator argument so that it can use the most efficient algorithm at compile time. For every iterator of type `Iterator`, `iterator_traits`< `Iterator`> **::iterator_category** must be defined to be the most specific category tag that describes the iterator's behavior.
28
28
29
-
The type is the same as **iterator**\< **Iter**> **::iterator_category** when **Iter** describes an object that can serve as a random-access iterator.
29
+
The type is the same as **iterator**\< **Iter**> **::iterator_category** when `Iter` describes an object that can serve as a random-access iterator.
0 commit comments