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/c-runtime-library/reference/open-wopen.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ The **_open** function opens the file specified by *filename* and prepares it fo
72
72
|**_O_CREAT**| Creates a file and opens it for writing. Has no effect if the file specified by *filename* exists. The *pmode* argument is required when **_O_CREAT** is specified. |
73
73
|**_O_CREAT**|**_O_SHORT_LIVED**| Creates a file as temporary and if possible does not flush to disk. The *pmode* argument is required when **_O_CREAT** is specified. |
74
74
|**_O_CREAT**|**_O_TEMPORARY**| Creates a file as temporary; the file is deleted when the last file descriptor is closed. The *pmode* argument is required when **_O_CREAT** is specified. |
75
-
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
75
+
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
76
76
|**_O_NOINHERIT**| Prevents creation of a shared file descriptor. |
77
77
|**_O_RANDOM**| Specifies that caching is optimized for, but not restricted to, random access from disk. |
78
78
|**_O_RDONLY**| Opens a file for reading only. Cannot be specified with **_O_RDWR** or **_O_WRONLY**. |
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/sopen-s-wsopen-s.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ The integer expression *oflag* is formed by combining one or more manifest const
86
86
|**_O_CREAT**| Creates a file and opens it for writing. Has no effect if the file specified by *filename* exists. The *pmode* argument is required when **_O_CREAT** is specified. |
87
87
|**_O_CREAT**|**_O_SHORT_LIVED**| Creates a file as temporary and if possible does not flush to disk. The *pmode* argument is required when **_O_CREAT** is specified. |
88
88
|**_O_CREAT**|**_O_TEMPORARY**| Creates a file as temporary; the file is deleted when the last file descriptor is closed. The *pmode* argument is required when **_O_CREAT** is specified. |
89
-
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
89
+
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
90
90
|**_O_NOINHERIT**| Prevents creation of a shared file descriptor. |
91
91
|**_O_RANDOM**| Specifies that caching is optimized for, but not restricted to, random access from disk. |
92
92
|**_O_RDONLY**| Opens a file for reading only. Cannot be specified with **_O_RDWR** or **_O_WRONLY**. |
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/sopen-wsopen.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ The integer expression *oflag* is formed by combining one or more of the followi
79
79
|**_O_CREAT**| Creates a file and opens it for writing. Has no effect if the file specified by *filename* exists. The *pmode* argument is required when **_O_CREAT** is specified. |
80
80
|**_O_CREAT**|**_O_SHORT_LIVED**| Creates a file as temporary and if possible does not flush to disk. The *pmode* argument is required when **_O_CREAT** is specified. |
81
81
|**_O_CREAT**|**_O_TEMPORARY**| Creates a file as temporary; the file is deleted when the last file descriptor is closed. The *pmode* argument is required when **_O_CREAT** is specified. |
82
-
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
82
+
|**_O_CREAT**|`_O_EXCL`| Returns an error value if a file specified by *filename* exists. Applies only when used with **_O_CREAT**. |
83
83
|**_O_NOINHERIT**| Prevents creation of a shared file descriptor. |
84
84
|**_O_RANDOM**| Specifies that caching is optimized for, but not restricted to, random access from disk. |
85
85
|**_O_RDONLY**| Opens a file for reading only. Cannot be specified with **_O_RDWR** or **_O_WRONLY**. |
Copy file name to clipboardExpand all lines: docs/cpp/pointers-to-members.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ int main()
71
71
}
72
72
```
73
73
74
-
In the preceding example, `pwCaption` is a pointer to any member of class `Window` that has type `char*`. The type of `pwCaption` is `char * Window::*`. The next code fragment declares pointers to the `SetCaption` and `GetCaption` member functions.
74
+
In the preceding example, `pwCaption` is a pointer to any member of class `Window` that has type `char*`. The type of `pwCaption` is `char * Window::*`. The next code fragment declares pointers to the `SetCaption` and `GetCaption` member functions.
Copy file name to clipboardExpand all lines: docs/mfc/reference/colecurrency-class.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ All of these constructors create new `COleCurrency` objects initialized to the s
111
111
112
112
- COleCurrency(`varSrc`) Constructs a `COleCurrency` object. Attempts to convert a [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) structure or `COleVariant` object to a currency (VT_CY) value. If this conversion is successful, the converted value is copied into the new `COleCurrency` object. If it is not, the value of the `COleCurrency` object is set to zero (0) and its status to invalid.
113
113
114
-
-`COleCurrency(`nUnits`, `nFractionalUnits`) Constructs a `COleCurrency` object from the specified numerical components. If the absolute value of the fractional part is greater than 10,000, the appropriate adjustment is made to the units. Note that the units and fractional part are specified by signed long values.
114
+
- COleCurrency(`nUnits`, `nFractionalUnits`) Constructs a `COleCurrency` object from the specified numerical components. If the absolute value of the fractional part is greater than 10,000, the appropriate adjustment is made to the units. Note that the units and fractional part are specified by signed long values.
115
115
116
116
For more information, see the [CURRENCY](/windows/win32/api/wtypes/ns-wtypes-cy~r1) and [VARIANT](/windows/win32/api/oaidl/ns-oaidl-variant) entries in the Windows SDK.
Copy file name to clipboardExpand all lines: docs/porting/visual-cpp-change-history-2003-2015.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -651,11 +651,11 @@ Although these differences can affect your source code or other build artifacts,
651
651
enum class my_type : size_t {};
652
652
```
653
653
654
-
Then, change your definition of **placement new** and **delete** to use this type as the second argument instead of `size_t`. You’ll also need to update the calls to placement new to pass the new type (for example, by using `static_cast<my_type>` to convert from the integer value) and update the definition of **new** and **delete** to cast back to the integer type. You don’t need to use an **enum** for this; a class type with a `size_t` member would also work.
654
+
Then, change your definition of **placement new** and **delete** to use this type as the second argument instead of `size_t`. You'll also need to update the calls to placement new to pass the new type (for example, by using `static_cast<my_type>` to convert from the integer value) and update the definition of **new** and **delete** to cast back to the integer type. You don't need to use an **enum** for this; a class type with a `size_t` member would also work.
655
655
656
656
An alternative solution is that you might be able to eliminate the **placement new** altogether. If your code uses **placement new** to implement a memory pool where the placement argument is the size of the object being allocated or deleted, then sized deallocation feature might be suitable to replace your own custom memory pool code, and you can get rid of the placement functions and just use your own two-argument **delete** operator instead of the placement functions.
657
657
658
-
If you don't want to update your code immediately, you can revert to the old behavior by using the compiler option `/Zc:sizedDealloc-`. If you use this option, the two-argument delete functions don’t exist and won't cause a conflict with your **placement delete** operator.
658
+
If you don't want to update your code immediately, you can revert to the old behavior by using the compiler option `/Zc:sizedDealloc-`. If you use this option, the two-argument delete functions don't exist and won't cause a conflict with your **placement delete** operator.
659
659
660
660
- **Union data members**
661
661
@@ -2847,7 +2847,7 @@ Although these differences can affect your source code or other build artifacts,
2847
2847
2848
2848
In Visual Studio 2012, the `E1` in expression `E1::b` resolved to `::E1` in the global scope. In Visual Studio 2013, `E1` in expression `E1::b` resolves to the `typedef E2` definition in `main()` and has type `::E2`.
2849
2849
2850
-
- Object layout has changed. On x64, the object layout of a class may change from previous releases. If it has a **virtual** function but it doesn’t have a base class that has a **virtual** function, the object model of the compiler inserts a pointer to a **virtual** function table after the data member layout. This means the layout may not be optimal in all cases. In previous releases, an optimization for x64 would try to improve the layout for you, but because it failed to work correctly in complex code situations, it was removed in Visual Studio 2013. For example, consider this code:
2850
+
- Object layout has changed. On x64, the object layout of a class may change from previous releases. If it has a **virtual** function but it doesn't have a base class that has a **virtual** function, the object model of the compiler inserts a pointer to a **virtual** function table after the data member layout. This means the layout may not be optimal in all cases. In previous releases, an optimization for x64 would try to improve the layout for you, but because it failed to work correctly in complex code situations, it was removed in Visual Studio 2013. For example, consider this code:
2851
2851
2852
2852
```cpp
2853
2853
__declspec(align(16)) struct S1 {
@@ -2925,7 +2925,7 @@ The C++ compiler in Visual Studio 2013 detects mismatches in _ITERATOR_DEBUG_LEV
2925
2925
2926
2926
- You must use `#include <algorithm>` when you call `std::min()` or `std::max()`.
2927
2927
2928
-
- If your existing code uses the previous release’s simulated scoped enums—traditional unscoped enums wrapped in namespaces—you have to change it. For example, if you referred to the type `std::future_status::future_status`, now you have to say `std::future_status`. However, most code is unaffected—for example, `std::future_status::ready` still compiles.
2928
+
- If your existing code uses the previous release's simulated scoped enums—traditional unscoped enums wrapped in namespaces—you have to change it. For example, if you referred to the type `std::future_status::future_status`, now you have to say `std::future_status`. However, most code is unaffected—for example, `std::future_status::ready` still compiles.
2929
2929
2930
2930
- `explicit operator bool()` is stricter than operator unspecified-bool-type(). `explicit operator bool()` permits explicit conversions to bool—for example, given `shared_ptr<X> sp`, both `static_cast<bool>(sp)` and `bool b(sp)` are valid—and Boolean-testable "contextual conversions" to bool—for example, `if (sp)`, `!sp`, `sp &&` whatever. However, `explicit operator bool()` forbids implicit conversions to bool, so you can't say `bool b = sp;` and given a bool return type, you can't say `return sp`.
2931
2931
@@ -3033,7 +3033,7 @@ The `SchedulerType` enumeration of `UmsThreadDefault` is deprecated. Specificati
3033
3033
3034
3034
### Standard Library
3035
3035
3036
-
- Following a breaking change between the C++98/03 and C++11 standards, using explicit template arguments to call `make_pair()` — as in `make_pair<int, int>(x, y)` — typically doesn't compile in Visual C++ in Visual Studio 2012. The solution is to always call `make_pair() `without explicit template arguments — as in `make_pair(x, y)`. Providing explicit template arguments defeats the purpose of the function. If you require precise control over the resulting type, use `pair` instead of `make_pair` — as in `pair<short, short>(int1, int2)`.
3036
+
- Following a breaking change between the C++98/03 and C++11 standards, using explicit template arguments to call `make_pair()` — as in `make_pair<int, int>(x, y)` — typically doesn't compile in Visual C++ in Visual Studio 2012. The solution is to always call `make_pair()` without explicit template arguments — as in `make_pair(x, y)`. Providing explicit template arguments defeats the purpose of the function. If you require precise control over the resulting type, use `pair` instead of `make_pair` — as in `pair<short, short>(int1, int2)`.
3037
3037
3038
3038
- Another breaking change between the C++98/03 and C++11 standards: When A is implicitly convertible to B and B is implicitly convertible to C, but A isn't implicitly convertible to C, C++98/03 and Visual Studio 2010 permitted `pair<A, X>` to be converted (implicitly or explicitly) to `pair<C, X>`. (The other type, X, isn't of interest here, and isn't specific to the first type in the pair.) The C++ compiler in Visual Studio 2012 detects that A isn't implicitly convertible to C, and removes the pair conversion from overload resolution. This change is a positive for many scenarios. For example, overloading `func(const pair<int, int>&)` and `func(const pair<string, string>&)`, and calling `func()` with `pair<const char *, const char *>` will compile with this change. However, this change breaks code that relied on aggressive pair conversions. Such code can typically be fixed by performing one part of the conversion explicitly—for example, by passing `make_pair(static_cast<B>(a), x)` to a function that expects `pair<C, X>`.
3039
3039
@@ -3051,7 +3051,7 @@ The `SchedulerType` enumeration of `UmsThreadDefault` is deprecated. Specificati
3051
3051
3052
3052
### CRT
3053
3053
3054
-
- The C Runtime (CRT) heap, which is used for new and malloc(), is no longer private. The CRT now uses the process heap. This means that the heap isn't destroyed when a DLL is unloaded, so DLLs that link statically to the CRT must ensure memory that's allocated by the DLL code is cleaned up before it’s unloaded.
3054
+
- The C Runtime (CRT) heap, which is used for new and malloc(), is no longer private. The CRT now uses the process heap. This means that the heap isn't destroyed when a DLL is unloaded, so DLLs that link statically to the CRT must ensure memory that's allocated by the DLL code is cleaned up before it's unloaded.
3055
3055
3056
3056
- The `iscsymf()` function asserts with negative values.
Copy file name to clipboardExpand all lines: docs/standard-library/basic-filebuf-class.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -375,7 +375,7 @@ If the buffer is already open, or if the file pointer is a null pointer, the fun
375
375
376
376
### Remarks
377
377
378
-
The member function opens the file with name *filename*, by calling [`fopen`](../c-runtime-library/reference/fopen-wfopen.md)`(filename, strmode)`. `strmode` is determined from `mode & ~(`[`ate`](../standard-library/ios-base-class.md#openmode)` | `[`binary`](../standard-library/ios-base-class.md#openmode)`)`:
378
+
The member function opens the file with name *filename*, by calling [`fopen`](../c-runtime-library/reference/fopen-wfopen.md)`(filename, strmode)`. `strmode` is determined from `mode & ~(`[`ate`](../standard-library/ios-base-class.md#openmode) `|` [`binary`](../standard-library/ios-base-class.md#openmode)`)`:
379
379
380
380
- `ios_base::in` becomes `"r"` (open existing file for reading).
Copy file name to clipboardExpand all lines: docs/standard-library/basic-istream-class.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -802,7 +802,7 @@ The first member function performs an absolute seek, the second member function
802
802
> [!NOTE]
803
803
> Do not use the second member function with text files, because Standard C++ does not support relative seeks in text files.
804
804
805
-
If [`fail`](../standard-library/basic-ios-class.md#fail) is false, the first member function calls `newpos = `[`rdbuf`](../standard-library/basic-ios-class.md#rdbuf)`->`[`pubseekpos`](../standard-library/basic-streambuf-class.md#pubseekpos)`(pos)`, for some `pos_type` temporary object `newpos`. If `fail` is false, the second function calls `newpos = rdbuf->`[`pubseekoff`](../standard-library/basic-streambuf-class.md#pubseekoff)`( off, way)`. In either case, if `(off_type)newpos == (off_type)(-1)` (the positioning operation fails), the function calls `istr.`[`setstate`](../standard-library/basic-ios-class.md#setstate)`(failbit)`. Both functions return __*this__.
805
+
If [`fail`](../standard-library/basic-ios-class.md#fail) is false, the first member function calls `newpos =` [`rdbuf`](../standard-library/basic-ios-class.md#rdbuf)`->`[`pubseekpos`](../standard-library/basic-streambuf-class.md#pubseekpos)`(pos)`, for some `pos_type` temporary object `newpos`. If `fail` is false, the second function calls `newpos = rdbuf->`[`pubseekoff`](../standard-library/basic-streambuf-class.md#pubseekoff)`( off, way)`. In either case, if `(off_type)newpos == (off_type)(-1)` (the positioning operation fails), the function calls `istr.`[`setstate`](../standard-library/basic-ios-class.md#setstate)`(failbit)`. Both functions return __*this__.
806
806
807
807
If [`fail`](../standard-library/basic-ios-class.md#fail) is true, the member functions do nothing.
808
808
@@ -847,7 +847,7 @@ If `_Istr.`[`good`](../standard-library/basic-ios-class.md#good) is true, the co
847
847
848
848
- Calls `_Istr.`[`tie`](../standard-library/basic-ios-class.md#tie)`->`[`flush`](../standard-library/basic-ostream-class.md#flush) if `_Istr.tie` is not a null pointer.
849
849
850
-
- Effectively calls [`ws`](../standard-library/istream-functions.md#ws)`(_Istr)` if `_Istr.`[`flags`](../standard-library/ios-base-class.md#flags)` & `[`skipws`](../standard-library/ios-functions.md#skipws) is nonzero.
850
+
- Effectively calls [`ws`](../standard-library/istream-functions.md#ws)`(_Istr)` if `_Istr.`[`flags`](../standard-library/ios-base-class.md#flags) `&` [`skipws`](../standard-library/ios-functions.md#skipws) is nonzero.
851
851
852
852
If after any such preparation, `_Istr.good` is false, the constructor calls `_Istr.`[`setstate`](../standard-library/basic-ios-class.md#setstate)`(failbit)`. In any case, the constructor stores the value returned by `_Istr.good` in `status`. A later call to `operator bool` delivers this stored value.
Copy file name to clipboardExpand all lines: docs/standard-library/forward-list-class.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -456,7 +456,7 @@ The initializer_list to copy.
456
456
457
457
### Remarks
458
458
459
-
All constructors store an [allocator](../standard-library/allocator-class.md) and initialize the controlled sequence. The allocator object is the argument *Al*, if present. For the copy constructor, it is `right.get_allocator()`. Otherwise, it is `Allocator()`.
459
+
All constructors store an [allocator](../standard-library/allocator-class.md) and initialize the controlled sequence. The allocator object is the argument *Al*, if present. For the copy constructor, it is `right.get_allocator()`. Otherwise, it is `Allocator()`.
460
460
461
461
The first two constructors specify an empty initial controlled sequence.
462
462
@@ -713,7 +713,7 @@ The unary predicate which, if satisfied by an element, results in the deletion o
713
713
714
714
### Remarks
715
715
716
-
The member function removes from the controlled sequence all elements, designated by the iterator `P`, for which `pred(*P)` is true.
716
+
The member function removes from the controlled sequence all elements, designated by the iterator `P`, for which `pred(*P)` is true.
717
717
718
718
An exception occurs only if *pred* throws an exception. In that case, the controlled sequence is left in an unspecified state and the exception is rethrown.
719
719
@@ -948,7 +948,7 @@ Keeps the first of each unique element, and removes the rest. The elements must
948
948
949
949
The first member function removes from the controlled sequence every element that compares equal to its preceding element. For the iterators `Pi` and `Pj` designating elements at positions `i` and `j`, the second member function removes every element for which `i + 1 == j && comp(*Pi, *Pj)`.
950
950
951
-
For a controlled sequence of length `N` (> 0), the predicate `comp(*Pi, *Pj)` is evaluated `N - 1` times.
951
+
For a controlled sequence of length `N` (> 0), the predicate `comp(*Pi, *Pj)` is evaluated `N - 1` times.
952
952
953
953
An exception occurs only if `comp` throws an exception. In that case, the controlled sequence is left in an unspecified state and the exception is rethrown.
0 commit comments