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
Copy file name to clipboardexpand all lines: docs/standard-library/rts-alloc-class.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ class rts_alloc
27
27
28
28
|Parameter|Description|
29
29
|---------------|-----------------|
30
-
|`Cache`|The type of cache instances contained in the array. This can be [cache_chunklist Class](../standard-library/cache-chunklist-class.md), [cache_freelist](../standard-library/cache-freelist-class.md), or [cache_suballoc](../standard-library/cache-suballoc-class.md).|
30
+
|*Cache*|The type of cache instances contained in the array. This can be [cache_chunklist Class](../standard-library/cache-chunklist-class.md), [cache_freelist](../standard-library/cache-freelist-class.md), or [cache_suballoc](../standard-library/cache-suballoc-class.md).|
|`count`|The number of elements in the array to be allocated.|
62
+
|*count*|The number of elements in the array to be allocated.|
63
63
64
64
### Return Value
65
65
66
66
A pointer to the allocated object.
67
67
68
68
### Remarks
69
69
70
-
The member function returns `caches[_IDX].allocate(count)`, where the index `_IDX` is determined by the requested block size `count`, or, if `count` is too large, it returns `operator new(count)`. `cache`, which represents the cache object.
70
+
The member function returns `caches[_IDX].allocate(count)`, where the index `_IDX` is determined by the requested block size *count*, or, if *count* is too large, it returns `operator new(count)`. `cache`, which represents the cache object.
|`ptr`|A pointer to the first object to be deallocated from storage.|
85
-
|`count`|The number of objects to be deallocated from storage.|
84
+
|*ptr*|A pointer to the first object to be deallocated from storage.|
85
+
|*count*|The number of objects to be deallocated from storage.|
86
86
87
87
### Remarks
88
88
89
-
The member function calls `caches[_IDX].deallocate(ptr, count)`, where the index `_IDX` is determined by the requested block size `count`, or, if `count` is too large, it returns `operator delete(ptr)`.
89
+
The member function calls `caches[_IDX].deallocate(ptr, count)`, where the index `_IDX` is determined by the requested block size *count*, or, if *count* is too large, it returns `operator delete(ptr)`.
Copy file name to clipboardexpand all lines: docs/standard-library/sample-container-class.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ ms.workload: ["cplusplus"]
16
16
> [!NOTE]
17
17
> This topic is in the Visual C++ documentation as a nonfunctional example of containers used in the C++ Standard Library. For more information, see [C++ Standard Library Containers](../standard-library/stl-containers.md).
18
18
19
-
Describes an object that controls a varying-length sequence of elements, typically of type **Ty**. The sequence is stored in different ways, depending on the actual container.
19
+
Describes an object that controls a varying-length sequence of elements, typically of type `Ty`. The sequence is stored in different ways, depending on the actual container.
20
20
21
21
A container constructor or member function may find occasion to call the constructor **Ty**(**const Ty&**) or the function **Ty::operator=**(**const Ty&**). If such a call throws an exception, the container object is obliged to maintain its integrity, and to rethrow any exception it catches. You can safely swap, assign to, erase, or destroy a container object after it throws one of these exceptions. In general, however, you cannot otherwise predict the state of the sequence controlled by the container object.
22
22
23
23
A few additional caveats:
24
24
25
-
- If the expression **~Ty** throws an exception, the resulting state of the container object is undefined.
25
+
- If the expression `~Ty` throws an exception, the resulting state of the container object is undefined.
26
26
27
27
- If the container stores an allocator object *al*, and *al* throws an exception other than as a result of a call to *al***.allocate**, the resulting state of the container object is undefined.
28
28
@@ -32,9 +32,9 @@ The container classes defined by C++ Standard Library satisfy several additional
32
32
33
33
Container template class [list](../standard-library/list-class.md) provides deterministic, and useful, behavior even in the presence of the exceptions described above. For example, if an exception is thrown during the insertion of one or more elements, the container is left unaltered and the exception is rethrown.
34
34
35
-
For *all* the container classes defined by C++ Standard Library, if an exception is thrown during calls to the following member functions, **insert**, **push_back**, or **push_front**, the container is left unaltered and the exception is rethrown.
35
+
For *all* the container classes defined by C++ Standard Library, if an exception is thrown during calls to the following member functions, `insert`, `push_back`, or `push_front`, the container is left unaltered and the exception is rethrown.
36
36
37
-
For *all* the container classes defined by C++ Standard Library, no exception is thrown during calls to the following member functions: **pop_back**, **pop_front**.
37
+
For *all* the container classes defined by C++ Standard Library, no exception is thrown during calls to the following member functions: `pop_back`, `pop_front`.
38
38
39
39
The member function [erase](../standard-library/container-class-erase.md) throws an exception only if a copy operation (assignment or copy construction) throws an exception.
40
40
@@ -46,29 +46,29 @@ The member function [swap](../standard-library/container-class-swap.md) makes ad
46
46
47
47
- References, pointers, and iterators that designate elements of the controlled sequences being swapped remain valid.
48
48
49
-
An object of a container class defined by C++ Standard Library allocates and frees storage for the sequence it controls through a stored object of type `Alloc`, which is typically a template parameter. Such an allocator object must have the same external interface as an object of class **allocator\<Ty>**. In particular, `Alloc` must be the same type as **Alloc::rebind<value_type>::other**
49
+
An object of a container class defined by C++ Standard Library allocates and frees storage for the sequence it controls through a stored object of type `Alloc`, which is typically a template parameter. Such an allocator object must have the same external interface as an object of class `allocator<Ty>`. In particular, `Alloc` must be the same type as `Alloc::rebind<value_type>::other`
50
50
51
-
For *all* container classes defined by C++ Standard Library, the member function **Alloc get_allocator const;** returns a copy of the stored allocator object. Note that the stored allocator object is *not* copied when the container object is assigned. All constructors initialize the value stored in **allocator**, to `Alloc` if the constructor contains no allocator parameter.
51
+
For *all* container classes defined by C++ Standard Library, the member function `Alloc get_allocator const;` returns a copy of the stored allocator object. Note that the stored allocator object is *not* copied when the container object is assigned. All constructors initialize the value stored in `allocator`, to `Alloc` if the constructor contains no allocator parameter.
52
52
53
53
According to the C++ Standard, a container class defined by the C++ Standard Library can assume that:
54
54
55
55
- All objects of class `Alloc` compare equal.
56
56
57
-
- Type **Alloc::const_pointer** is the same as **const Ty \***.
57
+
- Type `Alloc::const_pointer` is the same as `const Ty *`.
58
58
59
-
- Type **Alloc::const_reference** is the same as **const Ty&**.
59
+
- Type `Alloc::const_reference` is the same as `const Ty&`.
60
60
61
-
- Type **Alloc::pointer** is the same as **Ty \***.
61
+
- Type `Alloc::pointer` is the same as `Ty *`.
62
62
63
-
- Type **Alloc::reference** is the same as **Ty&**.
63
+
- Type `Alloc::reference` is the same as `Ty&`.
64
64
65
65
In this implementation, however, containers do not make such simplifying assumptions. Thus, they work properly with allocator objects that are more ambitious:
66
66
67
67
- All objects of class `Alloc` does not need to compare equal. (You can maintain multiple pools of storage.)
68
68
69
-
- Type **Alloc::const_pointer** does not need to be the same as **const Ty \***. (A const pointer can be a class.)
69
+
- Type `Alloc::const_pointer` does not need to be the same as `const Ty *`. (A const pointer can be a class.)
70
70
71
-
- Type **Alloc::pointer** does not need to be the same as **Ty \***. (A pointer can be a class.)
71
+
- Type `Alloc::pointer` does not need to be the same as `Ty *`. (A pointer can be a class.)
Copy file name to clipboardexpand all lines: docs/standard-library/sample-container-members.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ ms.workload: ["cplusplus"]
30
30
|[reference](../standard-library/container-class-reference.md)|Describes an object that can serve as a reference to an element of the controlled sequence.|
31
31
|[reverse_iterator](../standard-library/container-class-reverse-iterator.md)|Describes an object that can serve as a reverse iterator for the controlled sequence.|
32
32
|[size_type](../standard-library/container-class-size-type.md)|Describes an object that can represent the length of any controlled sequence.|
33
-
|[value_type](../standard-library/container-class-value-type.md)|Acts a synonym for the template parameter **Ty**.|
33
+
|[value_type](../standard-library/container-class-value-type.md)|Acts a synonym for the template parameter `Ty`.|
Copy file name to clipboardexpand all lines: docs/standard-library/scl-secure-no-warnings.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.workload: ["cplusplus"]
14
14
---
15
15
# _SCL_SECURE_NO_WARNINGS
16
16
17
-
Calling any of the potentially unsafe methods in the C++ Standard Library results in [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). To disable this warning, define the macro **_SCL_SECURE_NO_WARNINGS** in your code:
17
+
Calling any of the potentially unsafe methods in the C++ Standard Library results in [Compiler Warning (level 3) C4996](../error-messages/compiler-warnings/compiler-warning-level-3-c4996.md). To disable this warning, define the macro _SCL_SECURE_NO_WARNINGS in your code:
A pointer to the memory location where the object is to be constructed.
147
147
148
-
`args`
148
+
*args*
149
149
A list of arguments.
150
150
151
-
`first`
151
+
*first*
152
152
An object of the first type in a pair.
153
153
154
-
`second`
154
+
*second*
155
155
An object of the second type in a pair.
156
156
157
-
`right`
157
+
*right*
158
158
An existing object to be moved or copied.
159
159
160
160
### Remarks
161
161
162
-
The first method constructs the object at `ptr` by calling `Outermost_traits::construct(OUTERMOST(*this), ptr, xargs...)`, where `xargs...` is one of the following.
162
+
The first method constructs the object at *ptr* by calling `Outermost_traits::construct(OUTERMOST(*this), ptr, xargs...)`, where `xargs...` is one of the following.
163
163
164
164
- If `uses_allocator<Ty, inner_allocator_type>` holds false, then `xargs...` is `args...`.
165
165
166
166
- If `uses_allocator<Ty, inner_allocator_type>` holds true, and `is_constructible<Ty, allocator_arg_t, inner_allocator_type, args...>` holds true, then `xargs...` is `allocator_arg, inner_allocator(), args...`.
167
167
168
168
- If `uses_allocator<Ty, inner_allocator_type>` holds true, and `is_constructible<Ty, args..., inner_allocator()>` holds true, then `xargs...` is `args..., inner_allocator()`.
169
169
170
-
The second method constructs the pair object at `ptr` by calling `Outermost_traits::construct(OUTERMOST(*this), &ptr->first, xargs...)`, where `xargs...` is `first...` modified as in the above list, and `Outermost_traits::construct(OUTERMOST(*this), &ptr->second, xargs...)`, where `xargs...` is `second...` modified as in the above list.
170
+
The second method constructs the pair object at *ptr* by calling `Outermost_traits::construct(OUTERMOST(*this), &ptr->first, xargs...)`, where `xargs...` is `first...` modified as in the above list, and `Outermost_traits::construct(OUTERMOST(*this), &ptr->second, xargs...)`, where `xargs...` is `second...` modified as in the above list.
171
171
172
172
The third method behaves the same as `this->construct(ptr, piecewise_construct, tuple<>, tuple<>)`.
An existing allocator to be used as the outer allocator.
288
288
289
-
`rest`
289
+
*rest*
290
290
A list of allocators to be used as the inner allocators.
291
291
292
292
### Remarks
293
293
294
-
The first constructor default constructs its stored allocator objects. Each of the next three constructors constructs its stored allocator objects from the corresponding objects in `right`. The last constructor constructs its stored allocator objects from the corresponding arguments in the argument list.
294
+
The first constructor default constructs its stored allocator objects. Each of the next three constructors constructs its stored allocator objects from the corresponding objects in *right*. The last constructor constructs its stored allocator objects from the corresponding arguments in the argument list.
This method effectively returns `scoped_allocator_adaptor(Outer_traits::select_on_container_copy_construction(*this), inner_allocator().select_on_container_copy_construction())`. The result is a new `scoped_allocator_adaptor` object with each stored allocator object initialized by calling `al.select_on_container_copy_construction()` for the corresponding allocator `al`.
306
+
This method effectively returns `scoped_allocator_adaptor(Outer_traits::select_on_container_copy_construction(*this), inner_allocator().select_on_container_copy_construction())`. The result is a new `scoped_allocator_adaptor` object with each stored allocator object initialized by calling `al.select_on_container_copy_construction()` for the corresponding allocator *al*.
Copy file name to clipboardexpand all lines: docs/standard-library/secure-scl.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -17,17 +17,17 @@ ms.workload: ["cplusplus"]
17
17
Superseded by [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md), this macro defines whether [Checked Iterators](../standard-library/checked-iterators.md) are enabled. By default, checked iterators are enabled in Debug builds, and disabled in Retail builds.
18
18
19
19
> [!IMPORTANT]
20
-
> Direct use of the `_SECURE_SCL` macro is deprecated. Instead, use `_ITERATOR_DEBUG_LEVEL` to control checked iterator settings. For more information, see [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md).
20
+
> Direct use of the _SECURE_SCL macro is deprecated. Instead, use _ITERATOR_DEBUG_LEVEL to control checked iterator settings. For more information, see [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md).
21
21
22
22
## Remarks
23
23
24
-
When checked iterators are enabled, unsafe iterator use causes a runtime error and the program is terminated. To enable checked iterators, set `_ITERATOR_DEBUG_LEVEL` to 1 or 2. This is equivalent to a `_SECURE_SCL` setting of 1, or enabled:
24
+
When checked iterators are enabled, unsafe iterator use causes a runtime error and the program is terminated. To enable checked iterators, set _ITERATOR_DEBUG_LEVEL to 1 or 2. This is equivalent to a _SECURE_SCL setting of 1, or enabled:
25
25
26
26
```cpp
27
27
#define_ITERATOR_DEBUG_LEVEL 1
28
28
```
29
29
30
-
To disable checked iterators, set `_ITERATOR_DEBUG_LEVEL` to 0. This is equivalent to a `_SECURE_SCL` setting of 0, or disabled:
30
+
To disable checked iterators, set _ITERATOR_DEBUG_LEVEL to 0. This is equivalent to a _SECURE_SCL setting of 0, or disabled:
0 commit comments