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/aligned-union-class.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The distinct types in the underlying union.
29
29
30
30
## Remarks
31
31
32
-
Use the template class to get the alignment and size needed to store a union in uninitialized storage. The member typedef `type` names a POD type suitable for storage of any type listed in *Types*; the minimum size is *Len*. The static member `alignment_value` of type `std::size_t` contains the strictest alignment required of all the types listed in *Types*.
32
+
Use the class template to get the alignment and size needed to store a union in uninitialized storage. The member typedef `type` names a POD type suitable for storage of any type listed in *Types*; the minimum size is *Len*. The static member `alignment_value` of type `std::size_t` contains the strictest alignment required of all the types listed in *Types*.
Copy file name to clipboardExpand all lines: docs/standard-library/allocator-base-class.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
@@ -38,7 +38,7 @@ class allocator_base
38
38
|[difference_type](#difference_type)|A signed integral type that can represent the difference between values of pointers to the type of object managed by the allocator.|
39
39
|[pointer](#pointer)|A type that provides a pointer to the type of object managed by the allocator.|
40
40
|[reference](#reference)|A type that provides a reference to the type of object managed by the allocator.|
41
-
|[size_type](#size_type)|An unsigned integral type that can represent the length of any sequence that an object of template class `allocator_base` can allocate.|
41
+
|[size_type](#size_type)|An unsigned integral type that can represent the length of any sequence that an object of type `allocator_base` can allocate.|
42
42
|[value_type](#value_type)|A type that is managed by the allocator.|
The template class describes an object that manages storage allocation and freeing for arrays of objects of type `Type`. An object of class `allocator` is the default allocator object specified in the constructors for several container template classes in the C++ Standard Library.
10
+
The class template describes an object that manages storage allocation and freeing for arrays of objects of type `Type`. An object of class `allocator` is the default allocator object specified in the constructors for several container class templates in the C++ Standard Library.
11
11
12
12
## Syntax
13
13
@@ -60,7 +60,7 @@ These `Type`s specify the form that pointers and references must take for alloca
60
60
|[difference_type](#difference_type)|A signed integral type that can represent the difference between values of pointers to the type of object managed by the allocator.|
61
61
|[pointer](#pointer)|A type that provides a pointer to the type of object managed by the allocator.|
62
62
|[reference](#reference)|A type that provides a reference to the type of object managed by the allocator.|
63
-
|[size_type](#size_type)|An unsigned integral type that can represent the length of any sequence that an object of template class `allocator` can allocate.|
63
+
|[size_type](#size_type)|An unsigned integral type that can represent the length of any sequence that an object of type `allocator` can allocate.|
64
64
|[value_type](#value_type)|A type that is managed by the allocator.|
The pointer type describes an object `ptr` that can designate, through the expression `*ptr`, any const object that an object of template class allocator can allocate.
303
+
The pointer type describes an object `ptr` that can designate, through the expression `*ptr`, any const object that an object of type `allocator` can allocate.
The signed integer type describes an object that can represent the difference between the addresses of any two elements in a sequence that an object of template class allocator can allocate.
586
+
The signed integer type describes an object that can represent the difference between the addresses of any two elements in a sequence that an object of type `allocator` can allocate.
587
587
588
588
#### Example
589
589
@@ -776,7 +776,7 @@ typedef value_type *pointer;
776
776
777
777
#### Remarks
778
778
779
-
The pointer type describes an object `ptr` that can designate, through the expression **\*ptr**, any object that an object of template class allocator can allocate.
779
+
The pointer type describes an object `ptr` that can designate, through the expression **\*ptr**, any object that an object of type `allocator` can allocate.
780
780
781
781
#### Example
782
782
@@ -838,7 +838,7 @@ The type of element for which memory is being allocated.
838
838
839
839
This structure is useful for allocating memory for type that differs from the element type of the container being implemented.
840
840
841
-
The member template class defines the type other. Its sole purpose is to provide the type name **allocator**\<_ **Other**>, given the type name **allocator**\< **Type**>.
841
+
The member class template defines the type other. Its sole purpose is to provide the type name **allocator**\<_ **Other**>, given the type name **allocator**\< **Type**>.
842
842
843
843
For example, given an allocator object `al` of type `A`, you can allocate an object of type `_Other` with the expression:
The template class describes an object that supplements an *allocator type*. An allocator type is any type that describes an allocator object that is used for managing allocated storage. Specifically, for any allocator type `Alloc`, you can use `allocator_traits<Alloc>` to determine all the information that is needed by an allocator-enabled container. For more information, see the default [allocator Class](../standard-library/allocator-class.md).
10
+
The class template describes an object that supplements an *allocator type*. An allocator type is any type that describes an allocator object that is used for managing allocated storage. Specifically, for any allocator type `Alloc`, you can use `allocator_traits<Alloc>` to determine all the information that is needed by an allocator-enabled container. For more information, see the default [allocator Class](../standard-library/allocator-class.md).
A specialization of the template class allocator to type **void**, defining the types that make sense in this context.
10
+
A specialization of the class template allocator to type **void**, defining the types that make sense in this context.
11
11
12
12
## Syntax
13
13
@@ -32,12 +32,12 @@ class allocator<void> {
32
32
33
33
## Remarks
34
34
35
-
The class explicitly specializes template class [allocator](../standard-library/allocator-class.md) for type **void**. Its constructors and assignment operator behave the same as for the template class, but it defines only the following types:
35
+
The class explicitly specializes class template [allocator](../standard-library/allocator-class.md) for type **void**. Its constructors and assignment operator behave the same as for the class template, but it defines only the following types:
The macro yields a template definition `template <class Type> class name {.....}` and a specialization `template <> class name<void> {.....}` which together define an allocator template class that uses the synchronization filter `sync` and a cache of type `cache`.
25
+
The macro yields a template definition `template <class Type> class name {.....}` and a specialization `template <> class name<void> {.....}` which together define an allocator class template that uses the synchronization filter `sync` and a cache of type `cache`.
26
26
27
27
For compilers that can compile rebind, the resulting template definition looks like this:
Copy file name to clipboardExpand all lines: docs/standard-library/allocators-header.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The node-based containers in the C++ Standard Library (std::list, std::set, std:
25
25
26
26
When used with containers that are not node-based (such as the C++ Standard Library containers std::vector std::deque, and std::basic_string), the alllocator templates will work correctly, but are not likely to provide any performance improvement over the default allocator.
27
27
28
-
An allocator is a template class that describes an object that manages storage allocation and freeing for objects and arrays of objects of a designated type. Allocator objects are used by several container template classes in the C++ Standard Library.
28
+
An allocator is a class template that describes an object that manages storage allocation and freeing for objects and arrays of objects of a designated type. Allocator objects are used by several container class templates in the C++ Standard Library.
29
29
30
30
The allocators are all templates of this type:
31
31
@@ -34,7 +34,7 @@ template<class Type>
34
34
classallocator;
35
35
```
36
36
37
-
where the template argument `Type` is the type managed by the allocator instance. The C++ Standard Library provides a default allocator, template class [allocator](../standard-library/allocator-class.md), which is defined in [\<memory>](../standard-library/memory.md). The \<allocators> header provides the following allocators:
37
+
where the template argument `Type` is the type managed by the allocator instance. The C++ Standard Library provides a default allocator, class template[allocator](../standard-library/allocator-class.md), which is defined in [\<memory>](../standard-library/memory.md). The \<allocators> header provides the following allocators:
_Lst1 allocates nodes with `allocator_chunklist` and the [sync_per_thread](../standard-library/sync-per-thread-class.md) synchronization filter.
71
71
72
-
A block allocator is a cache or a filter. A cache is a template class that takes one argument of type std::size_t. It defines a block allocator that allocates and deallocates memory blocks of a single size. It must obtain memory using operator **new**, but it need not make a separate call to operator **new** for each block. It may, for example, suballocate from a larger block or cache deallocated blocks for subsequent reallocation.
72
+
A block allocator is a cache or a filter. A cache is a class template that takes one argument of type std::size_t. It defines a block allocator that allocates and deallocates memory blocks of a single size. It must obtain memory using operator **new**, but it need not make a separate call to operator **new** for each block. It may, for example, suballocate from a larger block or cache deallocated blocks for subsequent reallocation.
73
73
74
74
With a compiler that cannot compile rebind the value of the std::size_t argument used when the template was instantiated is not necessarily the value of the argument _Sz passed to a cache's member functions allocate and deallocate.
75
75
@@ -113,7 +113,7 @@ The cache template `cache_freelist` takes a max class argument which determines
113
113
114
114
|Macro|Description|
115
115
|-|-|
116
-
|[ALLOCATOR_DECL](../standard-library/allocators-functions.md#allocator_decl)|Yields an allocator template class.|
116
+
|[ALLOCATOR_DECL](../standard-library/allocators-functions.md#allocator_decl)|Yields an allocator class template.|
@@ -145,7 +145,7 @@ The cache template `cache_freelist` takes a max class argument which determines
145
145
|[max_none](../standard-library/max-none-class.md)|Describes a max class object that limits a [freelist](../standard-library/freelist-class.md) object to a maximum length of zero.|
146
146
|[max_unbounded](../standard-library/max-unbounded-class.md)|Describes a max class object that does not limit the maximum length of a [freelist](../standard-library/freelist-class.md) object.|
147
147
|[max_variable_size](../standard-library/max-variable-size-class.md)|Describes a max class object that limits a [freelist](../standard-library/freelist-class.md) object to a maximum length that is roughly proportional to the number of allocated memory blocks.|
148
-
|[rts_alloc](../standard-library/rts-alloc-class.md)|The rts_alloc template class describes a [filter](../standard-library/allocators-header.md) that holds an array of cache instances and determines which instance to use for allocation and deallocation at runtime instead of at compile time.|
148
+
|[rts_alloc](../standard-library/rts-alloc-class.md)|The rts_alloc class template describes a [filter](../standard-library/allocators-header.md) that holds an array of cache instances and determines which instance to use for allocation and deallocation at runtime instead of at compile time.|
149
149
|[sync_none](../standard-library/sync-none-class.md)|Describes a synchronization filter that provides no synchronization.|
150
150
|[sync_per_container](../standard-library/sync-per-container-class.md)|Describes a synchronization filter that provides a separate cache object for each allocator object.|
151
151
|[sync_per_thread](../standard-library/sync-per-thread-class.md)|Describes a synchronization filter that provides a separate cache object for each thread.|
Copy file name to clipboardExpand all lines: docs/standard-library/array-operators.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
@@ -113,7 +113,7 @@ Right container to compare.
113
113
114
114
### Remarks
115
115
116
-
The template function overloads `operator<` to compare two objects of template class [array Class](../standard-library/array-class-stl.md). The function returns `lexicographical_compare(left.begin(), left.end(), right.begin())`.
116
+
The template function overloads `operator<` to compare two objects of class template[array Class](../standard-library/array-class-stl.md). The function returns `lexicographical_compare(left.begin(), left.end(), right.begin())`.
117
117
118
118
### Example
119
119
@@ -259,7 +259,7 @@ Right container to compare.
259
259
260
260
### Remarks
261
261
262
-
The template function overloads `operator==` to compare two objects of template class [array Class](../standard-library/array-class-stl.md). The function returns `equal(left.begin(), left.end(), right.begin())`.
262
+
The template function overloads `operator==` to compare two objects of class template[array Class](../standard-library/array-class-stl.md). The function returns `equal(left.begin(), left.end(), right.begin())`.
Defines classes and template classes to use to create types that support atomic operations.
9
+
Defines classes and class templates to use to create types that support atomic operations.
10
10
11
11
## Syntax
12
12
@@ -31,7 +31,7 @@ On some platforms, it might not be possible to efficiently implement atomic oper
31
31
32
32
The class [atomic_flag](../standard-library/atomic-flag-structure.md) provides a minimal atomic type that holds a **bool** flag. Its operations are always lock-free.
33
33
34
-
The template class `atomic<T>` stores an object of its argument type `T` and provides atomic access to that stored value. You can instantiate it by using any type that can be copied by using [memcpy](../c-runtime-library/reference/memcpy-wmemcpy.md) and tested for equality by using [memcmp](../c-runtime-library/reference/memcmp-wmemcmp.md). In particular, you can use it with user-defined types that meet these requirements and, in many cases, with floating-point types.
34
+
The class template`atomic<T>` stores an object of its argument type `T` and provides atomic access to that stored value. You can instantiate it by using any type that can be copied by using [memcpy](../c-runtime-library/reference/memcpy-wmemcpy.md) and tested for equality by using [memcmp](../c-runtime-library/reference/memcmp-wmemcmp.md). In particular, you can use it with user-defined types that meet these requirements and, in many cases, with floating-point types.
35
35
36
36
The template also has a set of specializations for integral types and a partial specialization for pointers. These specializations provide additional operations that are not available through the primary template.
0 commit comments