Skip to content

Commit c930be2

Browse files
author
mikeblome
committed
updates per tech review
1 parent b1a5dfb commit c930be2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/cpp-conformance-improvements-2017.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ To fix the warning, put extern "C" first:
537537
```cpp
538538
extern "C" __declspec(noinline) HRESULT __stdcall
539539
```
540+
This warning is off-by-default and only impacts code compiled with `/Wall /WX`.
540541
541542
### decltype and calls to deleted destructors
542543
In previous versions of Visual Studio, the compiler did not detect when a call to a deleted destructor occurred in the context of the expression associated with 'decltype'. In Update Version 15.3, the following code produces "error C2280: 'A<T>::~A(void)': attempting to reference a deleted function":
@@ -670,9 +671,10 @@ void g()
670671
```
671672
672673
To fix the problem, either change the **f(S)** signature or remove it.
674+
Note that the warning is off-by-default and only affects code compiled with /Wall or /WX.
673675
674676
### C5038: order of initialization in initializer lists
675-
Class members are initialized in the order they are declared, not the order they appear in initializer lists. Previous versions of the compiler did not warn when the order of the initializer list differed from the order of declaration. This could lead to undefined runtime behavior if the intialization of one member depended on another member in the list already being initialized. In the following example, Visual Studio 2017 Update Version 15.3 raises warning C5038 warning C5038: data member 'A::y' will be initialized after data member 'A::x':
677+
Class members are initialized in the order they are declared, not the order they appear in initializer lists. Previous versions of the compiler did not warn when the order of the initializer list differed from the order of declaration. This could lead to undefined runtime behavior if the intialization of one member depended on another member in the list already being initialized. In the following example, Visual Studio 2017 Update Version 15.3 (with /Wall or /WX) raises warning C5038: data member 'A::y' will be initialized after data member 'A::x':
676678
677679
```cpp
678680
struct A

0 commit comments

Comments
 (0)