Skip to content

Commit 2df807a

Browse files
TaojunshenTylerMSFTColin Robertsonkylereedmsftweijiechai
authored
10/19/2021 AM Publish (#3846)
* add new classes: ambiguous_local_time & nonexistent_local_time * acrolinx * fix links * finish descriptions * fix more links * smoothing out * proofing * add some better linking * tune description * update descriptions * needed to update local-info-struct.md to reflect changes to descriptions for nonexistent and ambiguous * add chrono functions * rounding out duration links * Add documentation for IntelliSense linter for C++ (#3821) * Add first draft of linter check documentation * WIP overview. Signed-off-by: Kyle Reed <[email protected]> * Update toc. First draft of the linter overview. * Add screenshots, move files, code samples are stand-alone. Signed-off-by: Kyle Reed <[email protected]> * Style and Acrolinx grammar checker pass * Add missing Options cues for checks * Update to use latest option names Co-authored-by: [email protected] <[email protected]> * connecting duration up to it's non-member pieces and doing some general updates * fix links * cleanup * Split out VS2019 content for linter (#3824) * Update working-with-project-properties.md * cleanup * cleanup * cleanup * cleanup * cleanup * cleanup * cleanup * fix function signature * fix line ending * remove duplicate * Address /profile issues per Paddy McD (#3834) * Fixed documentation that destroy dialogs * Update void-cpp for cpp-docs 3441 Reported in MicrosoftDocs/cpp-docs/issues/3441 Clarify kinds of class member where you can't use `void*`. Fix styles. Acrolinx a few things. * More clarity on void pointers to members * zoned_traits (#3831) * add zoned_traits * draft clock_cast and clock_time_conversion * first draft * draft * draft * fix heading * cleanup * add tzdb and tzdb-list * draft * draft * pull examples * draft cleanup * acrolinx * draft cleanup * draft cleanup * incorp tech review * tech review * cleanup * cleanup * acrolinx * fix casing * add example descriptions * wording * last adjustments * wording Co-authored-by: TylerMSFT <[email protected]> * Update 16.1 conformance per J Emmett * Update docs/error-messages/compiler-errors-2/compiler-error-c2666.md * Fix typo in page title * Fix TOC schema before VS2022 changes Co-authored-by: TylerMSFT <[email protected]> Co-authored-by: Colin Robertson <[email protected]> Co-authored-by: Kyle Reed <[email protected]> Co-authored-by: Chai Wei Jie <[email protected]> Co-authored-by: opbld15 <[email protected]> Co-authored-by: PRMerger19 <[email protected]> Co-authored-by: Laura Brenner <[email protected]> Co-authored-by: Courtney Wales <[email protected]> Co-authored-by: Andrea Courtright <[email protected]> Co-authored-by: PRMerger15 <[email protected]> Co-authored-by: opbld16 <[email protected]> Co-authored-by: PRMerger8 <[email protected]> Co-authored-by: Anju Del Moral Gonzalez <[email protected]> Co-authored-by: opbld17 <[email protected]> Co-authored-by: Tyler Whitney <[email protected]> Co-authored-by: Miya Natsuhara <[email protected]> Co-authored-by: Kristine Toliver <[email protected]>
1 parent 2814bfe commit 2df807a

File tree

32 files changed

+139
-10
lines changed

32 files changed

+139
-10
lines changed

docs/_breadcrumb/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Docs
23
tocHref: /
34
topicHref: /

docs/assembler/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Compiler intrinsics and assembly language
23
href: ../intrinsics/index.yml
34
- name: Compiler intrinsics

docs/atl-mfc-shared/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: ATL-MFC shared classes
23
href: ../atl-mfc-shared/atl-mfc-shared-classes.md
34
- name: ATL-MFC concepts

docs/atl/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Active Template Library (ATL)
23
href: atl-com-desktop-components.md
34
- name: Active Template Library (ATL) concepts

docs/build-insights/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: "C++ Build Insights"
23
href: ../build-insights/index.yml
34
- name: "Get started with C++ Build Insights"

docs/build/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Projects and build systems
23
href: ../build/projects-and-build-systems-cpp.md
34
- name: Visual Studio projects - C++

docs/c-language/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C language documentation
23
href: ../c-language/index.yml
34
- name: C language reference

docs/c-runtime-library/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C runtime library (CRT) reference
23
href: ../c-runtime-library/c-run-time-library-reference.md
34
- name: CRT library features

docs/code-quality/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Code analysis documentation
23
href: ../code-quality/index.yml
34
- name: Overview

docs/cpp/toc.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C++ language documentation
23
href: ../cpp/index.yml
34
- name: C++ language reference
@@ -69,9 +70,9 @@
6970
href: ../cpp/void-cpp.md
7071
- name: bool
7172
href: ../cpp/bool-cpp.md
72-
- name: false
73+
- name: "false"
7374
href: ../cpp/false-cpp.md
74-
- name: true
75+
- name: "true"
7576
href: ../cpp/true-cpp.md
7677
- name: char, wchar_t, char8_t, char16_t, char32_t
7778
href: ../cpp/char-wchar-t-char16-t-char32-t.md
@@ -419,8 +420,6 @@
419420
href: ../cpp/special-member-functions.md
420421
- name: Static members
421422
href: ../cpp/static-members-cpp.md
422-
- name: C++ classes as value types
423-
href: ../cpp/value-types-modern-cpp.md
424423
- name: User-defined type conversions
425424
href: ../cpp/user-defined-type-conversions-cpp.md
426425
- name: Mutable data members
@@ -481,8 +480,6 @@
481480
href: ../cpp/how-to-create-and-use-weak-ptr-instances.md
482481
- name: "How to: Create and use CComPtr and CComQIPtr instances"
483482
href: ../cpp/how-to-create-and-use-ccomptr-and-ccomqiptr-instances.md
484-
- name: Pimpl for compile-time encapsulation
485-
href: ../cpp/pimpl-for-compile-time-encapsulation-modern-cpp.md
486483
- name: Exception handling in C++
487484
items:
488485
- name: Exception handling in C++

docs/cppcx/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: UWP development
23
href: ../cppcx/universal-windows-apps-cpp.md
34
- name: C++/CX language reference

docs/cross-platform/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Cross-platform mobile development with C++
23
href: ../cross-platform/index.yml
34
- name: Overview

docs/data/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Data access in Visual C++
23
href: ../data/data-access-in-cpp.md
34
- name: Data access programming (MFC-ATL)

docs/dotnet/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: .NET programming with C++/CLI
23
href: ../dotnet/dotnet-programming-with-cpp-cli-visual-cpp.md
34
- name: "Walkthrough: Compile a C++/CLI program that targets the CLR"

docs/error-messages/compiler-errors-2/compiler-error-c2666.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Compiler Error C2666"
33
title: "Compiler Error C2666"
4-
ms.date: "11/04/2016"
4+
ms.date: 10/18/2021
55
f1_keywords: ["C2666"]
66
helpviewer_keywords: ["C2666"]
77
ms.assetid: 78364d15-c6eb-439a-9088-e04a0176692b
@@ -30,6 +30,52 @@ int main() {
3030
}
3131
```
3232
33+
This error can be generated as a result of compiler conformance work that was done for Visual Studio 2019 version 16.1:
34+
35+
- A conversion that promotes an enumeration whose underlying type is fixed to its underlying type is better than one that promotes to the promoted underlying type, if the two are different.
36+
37+
The following example demonstrates how compiler behavior changes in Visual Studio 2019 version 16.1 and later versions:
38+
39+
```cpp
40+
#include <type_traits>
41+
42+
enum E : unsigned char { e };
43+
44+
int f(unsigned int)
45+
{
46+
return 1;
47+
}
48+
49+
int f(unsigned char)
50+
{
51+
return 2;
52+
}
53+
54+
struct A {};
55+
struct B : public A {};
56+
57+
int f(unsigned int, const B&)
58+
{
59+
return 3;
60+
}
61+
62+
int f(unsigned char, const A&)
63+
{
64+
return 4;
65+
}
66+
67+
int main()
68+
{
69+
// Calls f(unsigned char) in 16.1 and later. Called f(unsigned int) in earlier versions.
70+
// The conversion from 'E' to the fixed underlying type 'unsigned char' is better than the
71+
// conversion from 'E' to the promoted type 'unsigned int'.
72+
f(e);
73+
74+
// Error C2666. This call is ambiguous, but previously called f(unsigned int, const B&).
75+
f(e, B{});
76+
}
77+
```
78+
3379
This error can also be generated as a result of compiler conformance work that was done for Visual Studio .NET 2003:
3480

3581
- binary operators and user-defined conversions to pointer types

docs/error-messages/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C/C++ Compiler and build tools errors and warnings
23
href: compiler-errors-1/c-cpp-build-errors.md
34
- name: BSCMAKE errors and warnings

docs/extensions/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Component Extensions for .NET and UWP
23
href: ../extensions/component-extensions-for-runtime-platforms.md
34
- name: Tracking reference operator

docs/get-started/breadcrumb/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Docs
23
tocHref: /
34
topicHref: /

docs/ide/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Read and write C++ code in Visual Studio
23
expanded: true
34
items:

docs/intrinsics/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Compiler intrinsics and assembly language
23
href: ../intrinsics/index.yml
34
- name: Compiler intrinsics

docs/linux/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Linux with Visual Studio C++ documentation
23
href: ../linux/index.yml
34
- name: Download, install, and set up the Linux Development workload

docs/mfc/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: MFC desktop applications
23
href: mfc-desktop-applications.md
34
- name: MFC concepts

docs/overview/cpp-conformance-improvements.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "C++ conformance improvements in Visual Studio 2019"
33
description: "Microsoft C++ in Visual Studio is progressing toward full conformance with the C++20 language standard."
4-
ms.date: 06/11/2021
4+
ms.date: 10/18/2021
55
ms.technology: "cpp-language"
66
---
77
# C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2019
@@ -523,6 +523,58 @@ void f() {
523523

524524
[P0329R4](https://wg21.link/p0329r4) (C++20) *Designated initialization* allows specific members to be selected in aggregate initialization by using the `Type t { .member = expr }` syntax. Requires **`/std:c++latest`** (or **`/std:c++20`** starting in Visual Studio 2019 version 16.11).
525525

526+
### Ranking of enum conversion to its fixed underlying type
527+
528+
The compiler now ranks enum conversions according to [N4800](https://wg21.link/n4800) 11.3.3.2 Ranking implicit conversion sequences (4.2):
529+
530+
- A conversion that promotes an enumeration whose underlying type is fixed to its underlying type is better than one that promotes to the promoted underlying type, if the two are different.
531+
532+
This conversion ranking wasn't implemented correctly before Visual Studio 2019 version 16.1. The conforming behavior may change overload resolution behavior or expose an ambiguity where one previously was not detected.
533+
534+
This compiler behavior change applies to all **`/std`** modes and is both a source and binary breaking change.
535+
536+
The following example demonstrates how compiler behavior changes in 16.1 and later versions:
537+
538+
```cpp
539+
#include <type_traits>
540+
541+
enum E : unsigned char { e };
542+
543+
int f(unsigned int)
544+
{
545+
return 1;
546+
}
547+
548+
int f(unsigned char)
549+
{
550+
return 2;
551+
}
552+
553+
struct A {};
554+
struct B : public A {};
555+
556+
int f(unsigned int, const B&)
557+
{
558+
return 3;
559+
}
560+
561+
int f(unsigned char, const A&)
562+
{
563+
return 4;
564+
}
565+
566+
int main()
567+
{
568+
// Calls f(unsigned char) in 16.1 and later. Called f(unsigned int) in earlier versions.
569+
// The conversion from 'E' to the fixed underlying type 'unsigned char' is better than the
570+
// conversion from 'E' to the promoted type 'unsigned int'.
571+
f(e);
572+
573+
// Error C2666. This call is ambiguous, but previously called f(unsigned int, const B&).
574+
f(e, B{});
575+
}
576+
```
577+
526578
### New and updated standard library functions (C++20)
527579
528580
- `starts_with()` and `ends_with()` for `basic_string` and `basic_string_view`.
@@ -2462,6 +2514,12 @@ struct S {
24622514
};
24632515
```
24642516

2517+
## <a name="improvements_16b"></a> Conformance improvements in Visual Studio 2019 version 16.11
2518+
2519+
### `/std:c++20` compiler mode
2520+
2521+
Starting in Visual Studio 2019 version 16.11, the compiler now supports the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) compiler mode. Previously, C++20 features were available only in [`/std:c++latest`](../build/reference/std-specify-language-standard-version.md) mode in Visual Studio 2019. Features that originally required **`/std:c++latest`** mode now work in **`/std:c++20`** mode or later in the latest versions of Visual Studio.
2522+
24652523
## See also
24662524

24672525
[Microsoft C/C++ language conformance](visual-cpp-language-conformance.md)

docs/overview/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Microsoft C/C++ in Visual Studio
23
expanded: false
34
items:

docs/parallel/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Parallel programming in MSVC
23
href: ../parallel/parallel-programming-in-visual-cpp.md
34
- name: Auto-parallelization and auto-vectorization

docs/porting/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Microsoft C++ Porting and Upgrade Guide
23
href: ../porting/visual-cpp-porting-and-upgrading-guide.md
34
- name: Upgrade projects from earlier versions

docs/preprocessor/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C/C++ preprocessor reference
23
href: ../preprocessor/c-cpp-preprocessor-reference.md
34
- name: Preprocessor

docs/sanitizers/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: "Code Sanitizers"
23
href: ../sanitizers/index.yml
34
- name: "AddressSanitizer"

docs/standard-library/file-clock-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: "Learn more about: file_clock class"
3-
title: "fiie_clock class"
3+
title: "file_clock class"
44
ms.date: 08/19/2021
55
f1_keywords: ["chrono/std::chrono::file_clock", "chrono/std::chrono::file_clock::now", "chrono/std::chrono::file_clock::to_utc", "chrono/std::chrono::file_clock::from_utc", "chrono/std::chrono::file_clock::is_steady Constant"]
66
---
@@ -177,4 +177,4 @@ A [time_point](time-point-class.md) object that represents the current time.
177177
[`system_clock` struct](system-clock-structure.md)\
178178
[`tai_clock` class](tai-clock-class.md)\
179179
[`utc_clock` class](utc-clock-class.md)\
180-
[Header Files Reference](cpp-standard-library-header-files.md)
180+
[Header Files Reference](cpp-standard-library-header-files.md)

docs/standard-library/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: C++ Standard Library reference
23
href: cpp-standard-library-reference.md
34
- name: C++ Standard Library header files

docs/text/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Text and strings in MSVC
23
href: ../text/text-and-strings-in-visual-cpp.md
34
- name: Unicode and MBCS

docs/windows/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
items:
12
- name: Overview of Windows programming in C++
23
href: ../windows/overview-of-windows-programming-in-cpp.md
34
- name: Desktop Applications in C++

0 commit comments

Comments
 (0)