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
Stream extraction operators for pointer-to-characters have been removed and replaced by extraction operators for array-of-characters (per [P0487R1](http://http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0487r1.html)). WG21 considers the removed overloads to be unsafe. In [/std:c++latest](../build/reference/std-specify-language-standard-version.md) mode, the following example now produces *C2679: binary '>>': no operator found which takes a right-hand operand of type 'char*' (or there is no acceptable conversion)*:
389
+
Stream extraction operators for pointer-to-characters have been removed and replaced by extraction operators for array-of-characters (per [P0487R1](http://http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0487r1.html)). WG21 considers the removed overloads to be unsafe. In [/std:c++latest](../build/reference/std-specify-language-standard-version.md) mode, the following example now produces *C2679: binary '>>': no operator found which takes a right-hand operand of type 'char\*' (or there is no acceptable conversion)*:
390
390
391
391
```cpp
392
392
char x[42];
@@ -395,7 +395,7 @@ Stream extraction operators for pointer-to-characters have been removed and repl
395
395
std::cin >> p;
396
396
```
397
397
398
-
To avoid the error, apply the extraction operator directly to the array variable:
398
+
To avoid the error, use the extraction operator with a char[] variable:
399
399
400
400
```cpp
401
401
char x[42];
@@ -410,7 +410,7 @@ New keywords **requires** and **concepts** have been added to the Microsoft C++
410
410
411
411
### Reinterpret_cast in a constexpr function
412
412
413
-
A **reinterpret_cast** is illegal in a **constexpr** function. The Microsoft C++ compiler would previously reject **reinterpret_cast** only if it were used in a **constexpr** context. In Visual Studio 2019, in all language standards modes, it correctly diagnoses its presence in the definition of a **constexpr** function. The following code now produces *C3615: constexpr function 'f' cannot result in a constant expression*.
413
+
A **reinterpret_cast** is illegal in a **constexpr** function. The Microsoft C++ compiler would previously reject **reinterpret_cast** only if it were used in a **constexpr** context. In Visual Studio 2019, in all language standards modes, the compiler correctly diagnoses a **reinterpret_cast** in the definition of a **constexpr** function. The following code now produces *C3615: constexpr function 'f' cannot result in a constant expression*.
414
414
415
415
```cpp
416
416
longlong i = 0;
@@ -777,9 +777,9 @@ class Foo {
777
777
};
778
778
```
779
779
780
-
### Stricter checking of 'extern "C"' functions.
780
+
### Stricter checking of extern "C" functions
781
781
782
-
If an 'extern "C"' function was declared in different namespaces, previous version of the Microsoft C++ compiler did not check whether the declarations were compatible. In Visual Studio 2019, version 16.3, the compiler performs such a check. In [/permissive-](../build/reference/permissive-standards-conformance.md) mode, the following code produces *C2371 : redefinition; different basic types* and *C2733 you cannot overload a function with C linkage*:
782
+
If an **extern "C"** function was declared in different namespaces, previous version of the Microsoft C++ compiler did not check whether the declarations were compatible. In Visual Studio 2019, version 16.3, the compiler performs such a check. In [/permissive-](../build/reference/permissive-standards-conformance.md) mode, the following code produces *C2371 : redefinition; different basic types* and *C2733 you cannot overload a function with C linkage*:
0 commit comments