Skip to content

Commit 7aaa116

Browse files
authored
Update compiler-warning-level-2-c4150.md
1 parent edebbfa commit 7aaa116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/error-messages/compiler-warnings/compiler-warning-level-2-c4150.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void NoDestruct( IncClass* pIncClass )
2323
}
2424
```
2525
26-
To fix the issue, put the definition of `IncClass` in the same translation unit or file as the `delete`. If the class is declared in a header file, it can be included in the translation unit. If the class isn't declared in a header file, the `NoDestruct` definition may need to be moved into the same file as the `IncClass` definition.
26+
To fix the issue, put the definition of `IncClass` in the same file as the `delete`. If the class is declared in a header file, it can be added to the file using `#include`. If the class isn't declared in a header file, the `NoDestruct` function definition may need to be moved into the same file as the `IncClass` definition.
2727
2828
```cpp
2929
// compile with: /W2
@@ -35,7 +35,7 @@ void NoDestruct( IncClass* pIncClass )
3535
}
3636
```
3737

38-
C4150 can also occur when the class is defined after the destructor call in the same translation unit. In the following example `IncClass` is declared before being used, but not defined until after:
38+
C4150 will be emitted when the class is defined after the destructor call in the same file. In the following example `IncClass` is declared before being used, but defined after the `delete`:
3939

4040
```cpp
4141
// C4150.cpp

0 commit comments

Comments
 (0)