Skip to content

Commit 0e614d5

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#3251 from MicrosoftDocs/master637617944839912007
Repo sync for protected CLA branch
2 parents f92e24f + 6546d58 commit 0e614d5

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

docs/build/vscpp-step-0-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Install C and C++ support in Visual Studio
33
description: "Learn how to install Visual Studio with support for Microsoft C/C++ and related workloads."
4-
ms.custom: "mvc"
4+
ms.custom: "vs-acquisition"
55
ms.date: 11/05/2020
66
ms.topic: "tutorial"
77
ms.devlang: "cpp"

docs/cpp/template-specialization-cpp.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Template Specialization (C++)"
33
title: "Template Specialization (C++)"
4-
ms.date: "11/04/2016"
4+
ms.date: 07/09/2021
55
helpviewer_keywords: ["partial specialization of class templates"]
66
ms.assetid: f3c67c0b-3875-434a-b8d8-bb47e99cf4f0
77
---
@@ -17,6 +17,8 @@ Class templates can be partially specialized, and the resulting class is still a
1717

1818
```cpp
1919
// partial_specialization_of_class_templates.cpp
20+
#include <stdio.h>
21+
2022
template <class T> struct PTS {
2123
enum {
2224
IsPointer = 0,
@@ -40,24 +42,25 @@ template <class T, class U> struct PTS<T U::*> {
4042

4143
struct S{};
4244

43-
extern "C" int printf_s(const char*,...);
44-
4545
int main() {
46-
printf_s("PTS<S>::IsPointer == %d PTS<S>::IsPointerToDataMember == %d\n",
46+
printf_s("PTS<S>::IsPointer == %d \nPTS<S>::IsPointerToDataMember == %d\n",
4747
PTS<S>::IsPointer, PTS<S>:: IsPointerToDataMember);
48-
printf_s("PTS<S*>::IsPointer == %d PTS<S*>::IsPointerToDataMember ==%d\n"
48+
printf_s("PTS<S*>::IsPointer == %d \nPTS<S*>::IsPointerToDataMember == %d\n"
4949
, PTS<S*>::IsPointer, PTS<S*>:: IsPointerToDataMember);
50-
printf_s("PTS<int S::*>::IsPointer == %d PTS"
50+
printf_s("PTS<int S::*>::IsPointer == %d \nPTS"
5151
"<int S::*>::IsPointerToDataMember == %d\n",
5252
PTS<int S::*>::IsPointer, PTS<int S::*>::
5353
IsPointerToDataMember);
5454
}
5555
```
5656
5757
```Output
58-
PTS<S>::IsPointer == 0 PTS<S>::IsPointerToDataMember == 0
59-
PTS<S*>::IsPointer == 1 PTS<S*>::IsPointerToDataMember ==0
60-
PTS<int S::*>::IsPointer == 0 PTS<int S::*>::IsPointerToDataMember == 1
58+
PTS<S>::IsPointer == 0
59+
PTS<S>::IsPointerToDataMember == 0
60+
PTS<S*>::IsPointer == 1
61+
PTS<S*>::IsPointerToDataMember == 0
62+
PTS<int S::*>::IsPointer == 0
63+
PTS<int S::*>::IsPointerToDataMember == 1
6164
```
6265

6366
## Example: Partial specialization for pointer types
@@ -159,6 +162,7 @@ int main() {
159162
xp.add(&j);
160163
xp.add(p);
161164
xp.add(p + 1);
165+
delete[] p;
162166
p = NULL;
163167
xp.add(p);
164168
xp.print();

docs/standard-library/chrono-functions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ In ISO 8601, weeks begin with Monday. The first week of the year must include Ja
538538
| `year_month_weekday_last` | D, F, g, G, j, U, V, W, Y, y, C, b, h, B, m, d, e, a, A, u, w |
539539
| `zoned_time` | z, Z, c, x, X, D, F, Y, C, y, b, B, h, m, d, e, a, A, u, w, H, I, M, S, r, R, T, p, g, G, U, V, W |
540540

541-
<a name="notice"></a><sup>1</sup>The implementation is currently consistent with [strftime](https://docs.microsoft.com/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l) in that although `O` (letter O) and `e` are accepted, they are ignored. That is, `"%Od"` is interpreted as `"%d"`.
541+
<a name="notice"></a><sup>1</sup>The implementation is currently consistent with [strftime](../c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l.md) in that although `O` (letter O) and `e` are accepted, they are ignored. That is, `"%Od"` is interpreted as `"%d"`.
542542

543543
## <a name="std-chrono-get-leap-second-info"></a> `get_leap_second_info`
544544

@@ -843,4 +843,4 @@ Unless `ToDuration` is a specialization of [`duration`](../standard-library/dura
843843
[`chrono` operators](./chrono-operators.md)\
844844
[`duration` class](./duration-class.md)\
845845
[`time_point` class](./time-point-class.md)\
846-
[`time_zone` class](./time-zone-class.md)
846+
[`time_zone` class](./time-zone-class.md)

0 commit comments

Comments
 (0)