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/naked-cpp.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ __declspec(naked) declarator
29
29
30
30
The compiler cannot generate an inline function for a function marked with the naked attribute, even if the function is also marked with the [__forceinline](inline-functions-cpp.md) keyword.
31
31
32
-
33
32
The compiler issues an error if the **naked** attribute is applied to anything other than the definition of a non-member method.
34
33
35
34
## Examples
@@ -61,7 +60,7 @@ __declspec( naked ) int func(); // Error--naked attribute not permitted on func
61
60
62
61
**END Microsoft Specific**
63
62
64
-
## See Also
63
+
## See also
65
64
[__declspec](../cpp/declspec.md)
66
65
[Keywords](../cpp/keywords-cpp.md)
67
66
[Naked Function Calls](../cpp/naked-function-calls.md)
Copy file name to clipboardExpand all lines: docs/cpp/name-resolution-for-dependent-types.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
@@ -84,7 +84,7 @@ int main()
84
84
85
85
### Output
86
86
87
-
```
87
+
```Output
88
88
Int MyNamespace::myFunction
89
89
```
90
90
@@ -120,5 +120,5 @@ int main() {
120
120
121
121
Conformance with the disambiguation rules is required because, by default, C++ assumes that `AY::Rebind` isn't a template, and so the compiler interprets the following "`<`" as a less-than. It has to know that `Rebind` is a template so that it can correctly parse "`<`" as an angle bracket.
Copy file name to clipboardExpand all lines: docs/cpp/namespaces-cpp.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,6 @@ ContosoData::Func(mgr);
43
43
using ContosoData::ObjectManager;
44
44
ObjectManager mgr;
45
45
mgr.DoSomething();
46
-
47
46
```
48
47
49
48
Use a using directive to bring everything in the namespace into scope:
@@ -54,7 +53,6 @@ using namespace ContosoData;
54
53
ObjectManager mgr;
55
54
mgr.DoSomething();
56
55
Func(mgr);
57
-
58
56
```
59
57
60
58
## <a id="using_directives"></a> using directives
@@ -75,11 +73,10 @@ namespace ContosoDataServer
75
73
{
76
74
void Foo();
77
75
int Bar();
78
-
79
76
}
80
77
```
81
78
82
-
Function implementations in contosodata.cpp should use the fully qualified name, even if you place a `using` directive at the top of the file:
79
+
Function implementations in contosodata.cpp should use the fully qualified name, even if you place a **using** directive at the top of the file:
83
80
84
81
```cpp
85
82
#include"contosodata.h"
@@ -138,7 +135,6 @@ namespace ContosoDataServer
138
135
139
136
int Bar(){...};
140
137
int Baz(int i) { return Details::CountImpl; }
141
-
142
138
}
143
139
```
144
140
@@ -195,7 +191,6 @@ namespace Parent
195
191
template<>
196
192
class C<int> {};
197
193
}
198
-
199
194
```
200
195
201
196
You can use inline namespaces as a versioning mechanism to manage changes to the public interface of a library. For example, you can create a single parent namespace, and encapsulate each version of the interface in its own namespace nested inside the parent. The namespace that holds the most recent or preferred version is qualified as inline, and is therefore exposed as if it were a direct member of the parent namespace. Client code that invokes the Parent::Class will automatically bind to the new code. Clients that prefer to use the older version can still access it by using the fully qualified path to the nested namespace that has that code.
namespace a_very_long_namespace_name { class Foo {}; }
247
241
namespace AVLNN = a_very_long_namespace_name;
248
242
void Bar(AVLNN::Foo foo){ }
249
-
250
243
```
251
244
252
245
## anonymous or unnamed namespaces
@@ -261,5 +254,5 @@ namespace
261
254
262
255
This is called an unnamed or anonymous namespace and it is useful when you want to make variable declarations invisible to code in other files (i.e. give them internal linkage) without having to create a named namespace. All code in the same file can see the identifiers in an unnamed namespace but the identifiers, along with the namespace itself, are not visible outside that file—or more precisely outside the translation unit.
263
256
264
-
## See Also
265
-
[Declarations and Definitions](declarations-and-definitions-cpp.md)
257
+
## See also
258
+
[Declarations and Definitions](declarations-and-definitions-cpp.md)
Copy file name to clipboardExpand all lines: docs/cpp/nested-class-declarations.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
@@ -197,5 +197,5 @@ int GetExtendedErrorStatus( char *message )
197
197
198
198
With the preceding interface, several classes can use the services of this function by passing a memory location where they want the error message copied.
199
199
200
-
## See Also
200
+
## See also
201
201
[Classes and Structs](../cpp/classes-and-structs-cpp.md)
Only one of the preceding two forms can be present for a given class. The first form takes a single argument of type **void \***, which contains a pointer to the object to deallocate. The second form—sized deallocation—takes two arguments, the first of which is a pointer to the memory block to deallocate and the second of which is the number of bytes to deallocate. The return type of both forms is **void** (**operator delete** cannot return a value).
141
+
Only one of the preceding two forms can be present for a given class. The first form takes a single argument of type `void *`, which contains a pointer to the object to deallocate. The second form—sized deallocation—takes two arguments, the first of which is a pointer to the memory block to deallocate and the second of which is the number of bytes to deallocate. The return type of both forms is **void** (**operator delete** cannot return a value).
142
142
143
143
The intent of the second form is to speed up searching for the correct size category of the object to be deleted, which is often not stored near the allocation itself and likely uncached; the second form is particularly useful when an **operator delete** function from a base class is used to delete an object of a derived class.
144
144
145
-
The **operator delete** function is static; therefore, it cannot be virtual. The `operator delete` function obeys access control, as described in [Member-Access Control](../cpp/member-access-control-cpp.md).
145
+
The **operator delete** function is static; therefore, it cannot be virtual. The **operator delete** function obeys access control, as described in [Member-Access Control](../cpp/member-access-control-cpp.md).
146
146
147
147
The following example shows user-defined **operator new** and **operator delete** functions designed to log allocations and deallocations of memory:
0 commit comments