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
{{ message }}
Repository navigation
Commit 54f9dcb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/cpp/new-operator-cpp.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Specifies type to be allocated; it can be either a built-in or user-defined type
63
63
*initializer*<br/>
64
64
Provides a value for the initialized object. Initializers cannot be specified for arrays. The **`new`** operator will create arrays of objects only if the class has a default constructor.
65
65
66
-
## Example: Allocates character array and object
66
+
## Example: Allocate character array and object
67
67
68
68
The following code example allocates a character array and an object of class `CName` and then frees them.
69
69
@@ -108,7 +108,7 @@ int main() {
108
108
}
109
109
```
110
110
111
-
## Example: new operator
111
+
## Example: `new` operator
112
112
113
113
If you use the placement new form of the **`new`** operator, the form with arguments in addition to the size of the allocation, the compiler does not support a placement form of the **`delete`** operator if the constructor throws an exception. For example:
Copy file name to clipboardExpand all lines: docs/cpp/selectany.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ A global data item can normally be initialized only once in an EXE or DLL projec
28
28
> [!NOTE]
29
29
> **`selectany`** can only be applied to the actual initialization of global data items that are externally visible.
30
30
31
-
## Example: selectany attribute
31
+
## Example: `selectany` attribute
32
32
33
33
This code shows how to use the **`selectany`** attribute:
34
34
@@ -62,7 +62,7 @@ int i;
62
62
__declspec(selectany) X x(1);
63
63
```
64
64
65
-
## Example: Use selectany attribute to ensure data COMDAT folding
65
+
## Example: Use `selectany` attribute to ensure data COMDAT folding
66
66
67
67
This code shows how to use the **`selectany`** attribute to ensure data COMDAT folding when you also use the [`/OPT:ICF`](../build/reference/opt-optimizations.md) linker option. Note that data must be marked with **`selectany`** and placed in a **`const`** (readonly) section. You must explicitly specify the read-only section.
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
@@ -39,7 +39,7 @@ You can use the **`static_assert`** keyword at namespace, class, or block 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: static_assert with namespace scope
42
+
## Example: `static_assert` with namespace scope
43
43
44
44
```cpp
45
45
static_assert(sizeof(void *) == 4, "64-bit code generation is not supported.");
@@ -49,7 +49,7 @@ static_assert(sizeof(void *) == 4, "64-bit code generation is not supported.");
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()`.
51
51
52
-
## Example: static_assert with class scope
52
+
## Example: `static_assert` with class scope
53
53
54
54
```cpp
55
55
#include<type_traits>
@@ -74,11 +74,11 @@ int main()
74
74
}
75
75
```
76
76
77
-
## Description of static_assert with block scope
77
+
## Description of `static_assert` with block scope
78
78
79
79
In the following example, the **`static_assert`** declaration has block scope. The **`static_assert`** verifies that the size of the VMPage structure is equal to the virtual memory pagesize of the system.
Copy file name to clipboardExpand all lines: docs/cpp/template-specialization-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,7 +171,7 @@ Null pointer!
171
171
3 87 8 100
172
172
```
173
173
174
-
## Example: Define partial specialization so one type is in
174
+
## Example: Define partial specialization so one type is `int`
175
175
176
176
The following example defines a template class that takes pairs of any two types and then defines a partial specialization of that template class specialized so that one of the types is **`int`**. The specialization defines an additional sort method that implements a simple bubble sort based on the integer.
Copy file name to clipboardExpand all lines: docs/cpp/using-declaration.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ using declarator-list ;
30
30
31
31
A using declaration introduces an unqualified name as a synonym for an entity declared elsewhere. It allows a single name from a specific namespace to be used without explicit qualification in the declaration region in which it appears. This is in contrast to the [using directive](../cpp/namespaces-cpp.md#using_directives), which allows *all* the names in a namespace to be used without qualification. The **`using`** keyword is also used for [type aliases](../cpp/aliases-and-typedefs-cpp.md).
32
32
33
-
## Example: using declaration in class field
33
+
## Example: `using` declaration in class field
34
34
35
35
A using declaration can be used in a class definition.
36
36
@@ -76,7 +76,7 @@ In B::f()
76
76
In B::g()
77
77
```
78
78
79
-
## Example: using declaration to declare a member
79
+
## Example: `using` declaration to declare a member
80
80
81
81
When used to declare a member, a using declaration must refer to a member of a base class.
82
82
@@ -185,7 +185,7 @@ void b() {
185
185
}
186
186
```
187
187
188
-
## Example: Local declarations and using declarations
188
+
## Example: Local declarations and `using` declarations
189
189
190
190
With respect to functions in namespaces, if a set of local declarations and using declarations for a single name are given in a declarative region, they must all refer to the same entity, or they must all refer to functions.
191
191
@@ -208,7 +208,7 @@ void g() {
208
208
209
209
In the example above, the `using B::i` statement causes a second `int i` to be declared in the `g()` function. The `using B::f` statement does not conflict with the `f(char)` function because the function names introduced by `B::f` have different parameter types.
210
210
211
-
## Example: Local function declarations and using declarations
211
+
## Example: Local function declarations and `using` declarations
212
212
213
213
A local function declaration cannot have the same name and type as a function introduced by using declaration. For example:
214
214
@@ -235,7 +235,7 @@ void h() {
235
235
}
236
236
```
237
237
238
-
## Example: using declaration and inheritance
238
+
## Example: `using` declaration and inheritance
239
239
240
240
With respect to inheritance, when a using declaration introduces a name from a base class into a derived class scope, member functions in the derived class override virtual member functions with the same name and argument types in the base class.
241
241
@@ -293,7 +293,7 @@ In B::g
293
293
In D::g(char)
294
294
```
295
295
296
-
## Example: using declaration accessibility
296
+
## Example: `using` declaration accessibility
297
297
298
298
All instances of a name mentioned in a using declaration must be accessible. In particular, if a derived class uses a using declaration to access a member of a base class, the member name must be accessible. If the name is that of an overloaded member function, then all functions named must be accessible.
Copy file name to clipboardExpand all lines: docs/data/oledb/using-dynamic-accessors.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The [DynamicConsumer](https://github.com/Microsoft/VCSamples/tree/master/VC2008S
14
14
15
15
[CDynamicAccessor](../../data/oledb/cdynamicaccessor-class.md) allows you to access a data source when you have no knowledge of the database schema (the database's underlying structure). `CDynamicAccessor` methods get column information such as column names, count, and data type. You use this column information to create an accessor dynamically at run time. The column information is stored in a buffer that is created and managed by this class. Get data from the buffer using the [GetValue](./cdynamicaccessor-class.md#getvalue) method.
0 commit comments