Skip to content

Commit 0a43f04

Browse files
author
Colin Robertson
committed
Formatting fixes for C4275 per issue #757
1 parent 483e9ca commit 0a43f04

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
---
22
title: "Compiler Warning (level 2) C4275"
3-
ms.date: "11/04/2016"
3+
ms.date: "02/08/2019"
44
f1_keywords: ["C4275"]
55
helpviewer_keywords: ["C4275"]
66
ms.assetid: 18de967a-0a44-4dbc-a2e8-fc4c067ba909
77
---
88
# Compiler Warning (level 2) C4275
99

10-
non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
10+
> non - DLL-interface class '*class_1*' used as base for DLL-interface class '*class_2*'
1111
12-
An exported class was derived from a class that was not exported.
12+
An exported class was derived from a class that wasn't exported.
1313

14-
To minimize the possibility of data corruption when exporting a class with [__declspec(dllexport)](../../cpp/dllexport-dllimport.md), ensure that:
14+
To minimize the possibility of data corruption when exporting a class with [__declspec(dllexport)](../../cpp/dllexport-dllimport.md), make sure that:
1515

1616
- All your static data is accessed through functions that are exported from the DLL.
1717

1818
- No inlined methods of your class can modify static data.
1919

20-
- No inlined methods of your class use CRT functions or other library functions use static data.
20+
- No inlined methods of your class use CRT functions or other library functions that use static data.
2121

22-
- No inlined class functions use CRT functions, or other library functions, where, for example, you access static data.
22+
- No inlined class functions use CRT functions, or other library functions, where you access static data.
2323

2424
- No methods of your class (regardless of inlining) can use types where the instantiation in the EXE and DLL have static data differences.
2525

2626
You can avoid exporting classes by defining a DLL that defines a class with virtual functions, and functions you can call to instantiate and delete objects of the type. You can then just call virtual functions on the type.
2727

28-
C4275 can be ignored in Visual C++ if you are deriving from a type in the C++ Standard Library, compiling a debug release (**/MTd**) and where the compiler error message refers to _Container_base.
28+
C4275 can be ignored in Visual C++ if you are deriving from a type in the C++ Standard Library, compiling a debug release (**/MTd**) and where the compiler error message refers to `_Container_base`.
2929

30-
```
30+
```cpp
3131
// C4275.cpp
3232
// compile with: /EHsc /MTd /W2 /c
3333
#include <vector>

0 commit comments

Comments
 (0)