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
Copy file name to clipboardExpand all lines: docs/cpp/static-assert.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,21 +35,21 @@ The compiler examines the **`static_assert`** declaration for syntax errors when
35
35
36
36
You can use the **`static_assert`** keyword at namespace, class, or block scope. (The **`static_assert`** keyword is technically a declaration, even though it does not introduce new name into your program, because it can be used at namespace scope.)
37
37
38
-
## Description
38
+
## Description of static_assert with namespace scope
39
39
40
40
In the following example, the **`static_assert`** declaration has namespace scope. Because the compiler knows the size of type `void *`, the expression is evaluated immediately.
41
41
42
-
## Example
42
+
## Example of static_assert with namespace scope
43
43
44
44
```cpp
45
45
static_assert(sizeof(void *) == 4, "64-bit code generation is not supported.");
46
46
```
47
47
48
-
## Description
48
+
## Description of static_assert with class scope
49
49
50
50
In the following example, the **`static_assert`** declaration has class scope. The **`static_assert`** verifies that a template parameter is a *plain old data* (POD) type. The compiler examines the **`static_assert`** declaration when it is declared, but does not evaluate the *constant-expression* parameter until the `basic_string` class template is instantiated in `main()`.
public IDBCreateSessionImpl<CCustomSource, CCustomSession>,
40
-
public IDBInitializeImpl<CCustomSource>,
41
-
public IDBPropertiesImpl<CCustomSource>,
42
-
public IPersistImpl<CCustomSource>,
43
-
public IInternalConnectionImpl<CCustomSource>
44
-
```
45
-
46
-
All the COM components derive from `CComObjectRootEx` and `CComCoClass`. `CComObjectRootEx` provides all the implementation for the `IUnknown` interface. It can handle any threading model. `CComCoClass` handles any error support required. If you want to send richer error information to the client, you can use some of the error APIs in `CComCoClass`.
47
-
48
-
The data source object also inherits from several 'Impl' classes. Each class provides the implementation for an interface. The data source object implements the `IPersist`, `IDBProperties`, `IDBInitialize`, and `IDBCreateSession` interfaces. Each interface is required by OLE DB to implement the data source object. You can choose to support or not support particular functionality by inheriting or not inheriting from one of these 'Impl' classes. If you want to support the `IDBDataSourceAdmin` interface, you inherit from the `IDBDataSourceAdminImpl` class to get the functionality required.
49
-
50
-
## COM Map
51
-
52
-
Whenever the client calls `QueryInterface` for an interface on the data source, it goes through the following COM map:
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-errors-1/compiler-error-c2001.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ A string constant cannot be continued on a second line unless you do the followi
17
17
18
18
Ending the first line with \n is not sufficient.
19
19
20
-
## Example
20
+
## Examples
21
21
22
22
The following sample generates C2001:
23
23
@@ -35,8 +35,6 @@ int main()
35
35
}
36
36
```
37
37
38
-
## Example
39
-
40
38
Spaces at the beginning of the next line after a line-continuation character are included in the string constant. None of the examples shown above embed a newline character into the string constant. You can embed a newline character as shown here:
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-errors-1/compiler-error-c2004.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ An identifier must appear in the parentheses following the preprocessor keyword.
13
13
14
14
This error can also be generated as a result of compiler conformance work that was done for Visual Studio .NET 2003: missing parenthesis in preprocessor directive. If the closing parenthesis is missing from a preprocessor directive, the compiler will generate an error.
0 commit comments