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/overview/cpp-conformance-improvements.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -459,7 +459,7 @@ The non-standard headers \<stdexcpt.h> and \<typeinfo.h> have been removed. Code
459
459
460
460
### Better enforcement of two-phase name lookup for qualified-ids in /permissive-
461
461
462
-
Two-phase name lookup requires that non-dependent names used in template bodies must be visible to the template at definition time. Previously, such names may have been found when the template is instantiated. This change makes it easier to write portable, conformant code in MSVC under the [/permissive-](../build/permissive-standards-conformance.md) flag.
462
+
Two-phase name lookup requires that non-dependent names used in template bodies must be visible to the template at definition time. Previously, such names may have been found when the template is instantiated. This change makes it easier to write portable, conformant code in MSVC under the [/permissive-](../build/reference/permissive-standards-conformance.md) flag.
463
463
464
464
In Visual Studio 2019 version 16.4, with the **/permissive-** flag set, the following example produces an error because `N::f` is not visible when the `f<T>` template is defined:
465
465
@@ -515,7 +515,7 @@ int* f(bool* p) {
515
515
516
516
### Standard rules for types of integer literals
517
517
518
-
In conformance mode (enabled by [/permissive-](../build/permissive-standards-conformance.md)), MSVC uses the standard rules for types of integer literals. Previously, decimal literals too large to fit in a signed 'int' were given type 'unsigned int'. Now such literals are given the next largest signed integer type, 'long long'. Additionally, literals with the 'll' suffix which are too large to fit in a signed type are given type 'unsigned long long'.
518
+
In conformance mode (enabled by [/permissive-](../build/reference/permissive-standards-conformance.md)), MSVC uses the standard rules for types of integer literals. Previously, decimal literals too large to fit in a signed 'int' were given type 'unsigned int'. Now such literals are given the next largest signed integer type, 'long long'. Additionally, literals with the 'll' suffix which are too large to fit in a signed type are given type 'unsigned long long'.
519
519
520
520
This can lead to different warning diagnostics being generated, and behavior differences for arithmetic operations performed on literals.
In compliance with the [meta.rqmts]() subclause of the Standard, the MSVC compiler now raises an error when it encounters a user-defined specialization of one of the specified type_traits templates in the `std` namespace. Unless otherwise specified, such specializations result in undefined behavior. The following example has undefined behavior because it violates the rule, and the `static_assert` fails with error **C2338**.
570
+
In compliance with the *meta.rqmts* subclause of the Standard, the MSVC compiler now raises an error when it encounters a user-defined specialization of one of the specified type_traits templates in the `std` namespace. Unless otherwise specified, such specializations result in undefined behavior. The following example has undefined behavior because it violates the rule, and the `static_assert` fails with error **C2338**.
In compliance with [over.match]/9 the compiler will no longer rewrite expressions with `operator==` if they involve a return type that is not a **bool**. The following code now produces *error C2088: '!=': illegal for struct*:
600
+
In compliance with *over.match/9* the compiler will no longer rewrite expressions with `operator==` if they involve a return type that is not a **bool**. The following code now produces *error C2088: '!=': illegal for struct*:
### Defaulted comparison operator in union-like classes
634
634
635
-
In compliance with [class.compare.default]/2 the compiler will no longer define a defaulted comparison operator if it is a member of a union-like class. The following example now produces *C2120: 'void' illegal with all types*:
635
+
In compliance with *class.compare.default/2* the compiler will no longer define a defaulted comparison operator if it is a member of a union-like class. The following example now produces *C2120: 'void' illegal with all types*:
### Defaulted comparison operator for classes with a reference member
668
668
669
-
In compliance with [class.compare.default]/2 the compiler will no longer define a defaulted comparison operator if the class contains a reference member. The following code now produces *error C2120: 'void' illegal with all types*:
669
+
In compliance with *class.compare.default/2* the compiler will no longer define a defaulted comparison operator if the class contains a reference member. The following code now produces *error C2120: 'void' illegal with all types*:
0 commit comments