Skip to content

Commit 6ba1f3f

Browse files
fixing formatting issue
fixing formatting issue that shows up on https://docs.microsoft.com/en-us/cpp/cpp/template-specialization-cpp via whatever MD rendering is used there. Specifically, it will show up on docs.microsoft.com as "any pointer type T\*. " and this fix addresses that. PS Am MSFT, alias 'waaldred'
1 parent 05fbd7c commit 6ba1f3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/cpp/template-specialization-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PTS<int S::*>::IsPointer == 0 PTS<int S::*>::IsPointerToDataMember == 1
8989
```
9090

9191
## Example
92-
If you have a template collection class that takes any type **T**, you can create a partial specialization that takes any pointer type **T\***. The following code demonstrates a collection class template `Bag` and a partial specialization for pointer types in which the collection dereferences the pointer types before copying them to the array. The collection then stores the values that are pointed to. With the original template, only the pointers themselves would have been stored in the collection, leaving the data vulnerable to deletion or modification. In this special pointer version of the collection, code to check for a null pointer in the `add` method is added.
92+
If you have a template collection class that takes any type **T**, you can create a partial specialization that takes any pointer type **T***. The following code demonstrates a collection class template `Bag` and a partial specialization for pointer types in which the collection dereferences the pointer types before copying them to the array. The collection then stores the values that are pointed to. With the original template, only the pointers themselves would have been stored in the collection, leaving the data vulnerable to deletion or modification. In this special pointer version of the collection, code to check for a null pointer in the `add` method is added.
9393

9494
```
9595
// partial_specialization_of_class_templates2.cpp

0 commit comments

Comments
 (0)