From d6c5667b443c63ce649d0c1d5b7e0caea87526ed Mon Sep 17 00:00:00 2001 From: Colin Robertson Date: Fri, 9 Jul 2021 17:08:33 -0700 Subject: [PATCH 1/3] Make extra fixes spotted in 3223 --- docs/cpp/template-specialization-cpp.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/cpp/template-specialization-cpp.md b/docs/cpp/template-specialization-cpp.md index 26b1c556ad..ea6f213f7d 100644 --- a/docs/cpp/template-specialization-cpp.md +++ b/docs/cpp/template-specialization-cpp.md @@ -1,7 +1,7 @@ --- description: "Learn more about: Template Specialization (C++)" title: "Template Specialization (C++)" -ms.date: "11/04/2016" +ms.date: 07/09/2021 helpviewer_keywords: ["partial specialization of class templates"] ms.assetid: f3c67c0b-3875-434a-b8d8-bb47e99cf4f0 --- @@ -17,6 +17,8 @@ Class templates can be partially specialized, and the resulting class is still a ```cpp // partial_specialization_of_class_templates.cpp +#include + template struct PTS { enum { IsPointer = 0, @@ -40,14 +42,12 @@ template struct PTS { struct S{}; -extern "C" int printf_s(const char*,...); - int main() { - printf_s("PTS::IsPointer == %d PTS::IsPointerToDataMember == %d\n", + printf_s("PTS::IsPointer == %d \nPTS::IsPointerToDataMember == %d\n", PTS::IsPointer, PTS:: IsPointerToDataMember); - printf_s("PTS::IsPointer == %d PTS::IsPointerToDataMember ==%d\n" + printf_s("PTS::IsPointer == %d \nPTS::IsPointerToDataMember == %d\n" , PTS::IsPointer, PTS:: IsPointerToDataMember); - printf_s("PTS::IsPointer == %d PTS" + printf_s("PTS::IsPointer == %d \nPTS" "::IsPointerToDataMember == %d\n", PTS::IsPointer, PTS:: IsPointerToDataMember); @@ -55,9 +55,12 @@ int main() { ``` ```Output -PTS::IsPointer == 0 PTS::IsPointerToDataMember == 0 -PTS::IsPointer == 1 PTS::IsPointerToDataMember ==0 -PTS::IsPointer == 0 PTS::IsPointerToDataMember == 1 +PTS::IsPointer == 0 +PTS::IsPointerToDataMember == 0 +PTS::IsPointer == 1 +PTS::IsPointerToDataMember == 0 +PTS::IsPointer == 0 +PTS::IsPointerToDataMember == 1 ``` ## Example: Partial specialization for pointer types @@ -159,6 +162,7 @@ int main() { xp.add(&j); xp.add(p); xp.add(p + 1); + delete[] p; p = NULL; xp.add(p); xp.print(); From 5de019f894b820c24c4f8bf1d2cc5db7ca1830f5 Mon Sep 17 00:00:00 2001 From: Kent Sharkey Date: Mon, 12 Jul 2021 11:29:37 -0700 Subject: [PATCH 2/3] Linkfix: C++ (2021-07) --- docs/standard-library/chrono-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/standard-library/chrono-functions.md b/docs/standard-library/chrono-functions.md index 3b033b1919..df4ca53d91 100644 --- a/docs/standard-library/chrono-functions.md +++ b/docs/standard-library/chrono-functions.md @@ -538,7 +538,7 @@ In ISO 8601, weeks begin with Monday. The first week of the year must include Ja | `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 | | `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 | -1The 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"`. +1The 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"`. ## `get_leap_second_info` @@ -843,4 +843,4 @@ Unless `ToDuration` is a specialization of [`duration`](../standard-library/dura [`chrono` operators](./chrono-operators.md)\ [`duration` class](./duration-class.md)\ [`time_point` class](./time-point-class.md)\ -[`time_zone` class](./time-zone-class.md) +[`time_zone` class](./time-zone-class.md) \ No newline at end of file From 74949c2bf6e0abe89d05c4e2d5fd02201e0279d3 Mon Sep 17 00:00:00 2001 From: j-martens Date: Tue, 13 Jul 2021 09:48:08 -0500 Subject: [PATCH 3/3] Adding custom metadata value (internal) ------- cc: @corob-msft --- docs/build/vscpp-step-0-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build/vscpp-step-0-installation.md b/docs/build/vscpp-step-0-installation.md index 148cba3ddc..98cc5601ad 100644 --- a/docs/build/vscpp-step-0-installation.md +++ b/docs/build/vscpp-step-0-installation.md @@ -1,7 +1,7 @@ --- title: Install C and C++ support in Visual Studio description: "Learn how to install Visual Studio with support for Microsoft C/C++ and related workloads." -ms.custom: "mvc" +ms.custom: "vs-acquisition" ms.date: 11/05/2020 ms.topic: "tutorial" ms.devlang: "cpp"