Skip to content

Commit 1af7e61

Browse files
author
mikeblome
committed
fixed error per tech review
1 parent c930be2 commit 1af7e61

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/cpp-conformance-improvements-2017.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ void g()
671671
```
672672
673673
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.
675674
676675
### C5038: order of initialization in initializer lists
677676
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':
@@ -687,5 +686,7 @@ struct A
687686
```
688687
To fix the problem arrange the intializer list to have the same order as the declarations. A similar warning is raised when one or both initializers refer to base class members.
689688

689+
Note that the warning is off-by-default and only affects code compiled with /Wall or /WX.
690+
690691
## See Also
691692
[Visual C++ Language Conformance](visual-cpp-language-conformance.md)

0 commit comments

Comments
 (0)