Skip to content

Commit bb9b078

Browse files
author
Michael Blome
committed
Merge branch 'mblome-longtitles' of github.com:Microsoft/vcppdocs into mblome-longtitles
local merge to enable pushing to origin
2 parents 5b88706 + 372831b commit bb9b078

17 files changed

Lines changed: 550 additions & 304 deletions

‎docs/c-runtime-library/reference/memcpy-s-wmemcpy-s.md‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,17 @@ errno_t wmemcpy_s(
9191

9292
### Error Conditions
9393

94-
|`dest`|`destSize`|`src`|Return value|Contents of `dest`|
95-
|------------|----------------|-----------|------------------|------------------------|
96-
|`NULL`|any|any|`EINVAL`|not modified|
97-
|any|any|`NULL`|`EINVAL`|`dest` is zeroed out|
98-
|any|< `count`|any|`ERANGE`|`dest` is zeroed out|
94+
|`dest`|`destSize`|`src`|`count`|Return value|Contents of `dest`|
95+
|------------|----------------|-----------|---|------------------|------------------------|
96+
|any|any|any|0|0|Not modified|
97+
|`NULL`|any|any|non-zero|`EINVAL`|Not modified|
98+
|any|any|`NULL`|non-zero|`EINVAL`|`dest` is zeroed out|
99+
|any|< `count`|any|non-zero|`ERANGE`|`dest` is zeroed out|
99100

100101
## Remarks
101102
`memcpy_s` copies `count` bytes from `src` to `dest`; `wmemcpy_s` copies `count` wide characters (two bytes). If the source and destination overlap, the behavior of `memcpy_s` is undefined. Use `memmove_s` to handle overlapping regions.
102103

103-
These functions validate their parameters. If `dest` or `src` is a null pointer, or `destSize` is smaller than `count`, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return `EINVAL` and set `errno` to `EINVAL`.
104+
These functions validate their parameters. If `count` is non-zero and `dest` or `src` is a null pointer, or `destSize` is smaller than `count`, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions return `EINVAL` or `ERANGE` and set `errno` to the return value.
104105

105106
## Requirements
106107

‎docs/cpp/inline-functions-cpp.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ private:
162162

163163
- The function is also marked with the [naked](../cpp/naked-cpp.md) [__declspec](../cpp/declspec.md) modifier.
164164

165-
If the compiler cannot inline a function declared with `__forceinline`, it generates a level 1 warning.
165+
If the compiler cannot inline a function declared with `__forceinline`, it generates a level 1 warning, except when:
166+
167+
- The function is compiled by using /Od or /Ob0. No inlining is expected in these cases.
168+
169+
- The function is defined externally, in an included library or another translation unit, or is a virtual call target or indirect call target. The compiler can't identify non-inlined code that it can't find in the current translation unit.
166170

167171
Recursive functions can be substituted inline to a depth specified by the [inline_depth](../preprocessor/inline-depth.md) pragma, up to a maximum of 16 calls. After that depth, recursive function calls are treated as calls to an instance of the function. The depth to which recursive functions are examined by the inline heuristic cannot exceed 16. The [inline_recursion](../preprocessor/inline-recursion.md) pragma controls the inline expansion of a function currently under expansion. See the [Inline-Function Expansion](../build/reference/ob-inline-function-expansion.md) (/Ob) compiler option for related information.
168172

‎docs/index.md‎

Lines changed: 435 additions & 157 deletions
Large diffs are not rendered by default.

‎docs/porting/porting-third-party-libraries.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ translation.priority.ht:
3333
- "zh-cn"
3434
- "zh-tw"
3535
---
36+
3637
# Porting third-party libraries
38+
3739
When you upgrade a project to the current version of Visual C++, you also have to upgrade any libraries that the project uses, so that the library and your project are built with the same version and flavor of the compiler. (For more information, see [Overview of potential upgrade issues](overview-of-potential-upgrade-issues-visual-cpp.md)).
3840

3941
## Introducing vcpkg

‎docs/porting/visual-cpp-porting-and-upgrading-guide.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
9292

9393
|Title|Description|
9494
|-----------|-----------------|
95-
|[Upgrading Projects from Earlier Versions of Visual C++](upgrading-projects-from-earlier-versions-of-visual-cpp.md)|Discusses how to use projects created in earlier versions of Visual C++.|
95+
|[Upgrading Projects from Earlier Versions of Visual C++](upgrading-projects-from-earlier-versions-of-visual-cpp.md)|Discusses how to use projects created in earlier versions of Visual C++.|
9696
|[What's New for Visual C++ in Visual Studio 2017 RC](what-s-new-for-visual-cpp-in-visual-studio.md)|Changes in the IDE and tools from Visual Studio 2015 to Visual Studio 2017|
9797
|[C++ conformance improvements in Visual Studio 2017](cpp-conformance-improvements-2017.md)|Standards conformance improvements from Visual Studio 2015 to Visual Studio 2017|
9898
|[Visual C++ change history 2003 - 2015](visual-cpp-change-history-2003-2015.md)|A list of all the changes in the Visual C++ libraries and build tools from Visual Studio 2003 through 2015 that might require changes in your code.|
@@ -101,7 +101,7 @@ This topic provides a guide for upgrading Visual C++ code. This includes getting
101101
|[Porting and Upgrading: Examples and Case Studies](porting-and-upgrading-examples-and-case-studies.md)|For this section, we ported and upgrades several samples and applications and discussed the experiences and results. You might find that reading these gives you a sense of what is involved in the porting and upgrading process. Throughout the process, we discuss tips and tricks for upgrading and show how specific errors were fixed.|
102102
|[Porting to the Universal Windows Platform](porting-to-the-universal-windows-platform-cpp.md)|Contains information about porting code to Windows 10|
103103
|[Introduction to Visual C++ for UNIX Users](introduction-to-visual-cpp-for-unix-users.md)|Provides information for UNIX users who are new to [!INCLUDE[vcprvc](../build/includes/vcprvc_md.md)] and want to become productive with it.|
104-
|[Porting from UNIX to Win32](porting-from-unix-to-win32.md)|Discusses options for migrating UNIX applications to Windows.|
104+
|[Porting from UNIX to Win32](porting-from-unix-to-win32.md)|Discusses options for migrating UNIX applications to Windows.|
105105
|[C++/CLI Migration Primer](../dotnet/cpp-cli-migration-primer.md)|Shows in detail how to upgrade your Managed Extensions for C++ syntax to use the new syntax. For more information, see [Component Extensions for Runtime Platforms](../windows/component-extensions-for-runtime-platforms.md).|
106106

107107
## See Also

‎docs/standard-library/add-cv-class.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ invoked const volatile S.f()
106106

107107
## Requirements
108108
**Header:** \<type_traits>
109-
110109
**Namespace:** std
111110

112111
## See Also

‎docs/standard-library/add-volatile-class.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ add_volatile<int> == int
8080
```
8181

8282
## Requirements
83+
8384
**Header:** \<type_traits>
8485

8586
**Namespace:** std

‎docs/standard-library/basic-stringbuf-class.md‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,6 @@ virtual pos_type seekpos(pos_type _Sp, ios_base::openmode _Mode = ios_base::in |
267267

268268
```
269269
basic_string<Elem, Tr, Alloc> str() const;
270-
271-
272270
void str(
273271
const basic_string<Elem, Tr, Alloc>& _Newstr);
274272
```
@@ -349,7 +347,7 @@ virtual int_type underflow();
349347
## <a name="basic_streambuf__swap"></a> basic_streambuf::swap
350348
Swaps the contents of this string buffer with another string buffer.
351349

352-
```cpp
350+
```
353351
void basic_stringbuf<T>::swap(basic_stringbuf& other)
354352
```
355353

@@ -360,13 +358,10 @@ void basic_stringbuf<T>::swap(basic_stringbuf& other)
360358
### Remarks
361359

362360
## <a name="basic_stringbuf__operator_eq"></a> basic_stringbuf::operator=
363-
Assigns the contents of the basic_stringbuf on the right side of the operator to the basic_stringbuf on the left side..
364-
365-
```cpp
366-
basic_stringbuf& basic_stringbuf:: operator=(const basic_stringbuf& other)
367-
```
361+
Assigns the contents of the basic_stringbuf on the right side of the operator to the basic_stringbuf on the left side.
368362

369363
```
364+
basic_stringbuf& basic_stringbuf:: operator=(const basic_stringbuf& other)
370365
```
371366

372367
### Parameters

‎docs/standard-library/fpos-class.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class fpos
9292
Create an object that contains information about a position (offset) in a stream.
9393

9494
```
95-
fpos(streamoff _Off =0);
95+
fpos(streamoff _Off = 0);
9696
9797
fpos(Statetype _State, fpos_t _Filepos);
9898
```
@@ -226,7 +226,6 @@ fpos<Statetype>& operator+=(streamoff _Off);
226226
227227
```
228228
streamoff operator-(const fpos<Statetype>& right) const;
229-
230229

231230
fpos<Statetype> operator-(streamoff _Off) const;
232231
```
@@ -287,7 +286,8 @@ bool operator==(const fpos<Statetype>& right) const;
287286
## <a name="fpos__operator_streamoff"></a> fpos::operator streamoff
288287
Cast object of type `fpos` to object of type `streamoff`.
289288
290-
``` operator streamoff() const;
289+
```
290+
operator streamoff() const;
291291
```
292292
293293
### Remarks

‎docs/standard-library/function-class.md‎

Lines changed: 36 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -52,46 +52,42 @@ public:
5252

5353
function();
5454
function(nullptr_t);
55-
5655
function(const function& right);
57-
5856
template <class Fty2>
59-
function(Fty2 fn);
60-
57+
function(Fty2 fn);
6158
template <class Fty2, class Alloc>
62-
function(reference_wrapper<Fty2>, const Alloc& Ax);
59+
function(reference_wrapper<Fty2>, const Alloc& Ax);
6360

6461
template <class Fty2, class Alloc>
65-
void assign(Fty2, const Alloc& Ax);
66-
62+
void assign(Fty2, const Alloc& Ax);
6763
template <class Fty2, class Alloc>
68-
assign(reference_wrapper<Fty2>, const Alloc& Ax);
64+
void assign(reference_wrapper<Fty2>, const Alloc& Ax);
6965
function& operator=(nullptr_t);
7066
function& operator=(const function&);
7167
template <class Fty2>
72-
function& operator=(Fty2);
68+
function& operator=(Fty2);
7369
template <class Fty2>
74-
function& operator=(reference_wrapper<Fty2>);
70+
function& operator=(reference_wrapper<Fty2>);
7571

7672
void swap(function&);
7773
explicit operator bool() const;
7874

7975
result_type operator()(T1, T2, ....., TN) const;
8076
const std::type_info& target_type() const;
8177
template <class Fty2>
82-
Fty2 *target();
78+
Fty2 *target();
8379

8480
template <class Fty2>
85-
const Fty2 *target() const;
81+
const Fty2 *target() const;
8682

8783
template <class Fty2>
88-
void operator==(const Fty2&) const = delete;
84+
void operator==(const Fty2&) const = delete;
8985
template <class Fty2>
90-
void operator!=(const Fty2&) const = delete;
86+
void operator!=(const Fty2&) const = delete;
9187
};
9288
```
9389

94-
#### Parameters
90+
### Parameters
9591
`Fty`
9692
The function type to wrap.
9793

@@ -154,15 +150,14 @@ public:
154150

155151
```
156152
template <class Fx, class Alloc>
157-
void assign(
158-
Fx _Func,
159-
const Alloc& Ax);
153+
void assign(
154+
Fx _Func,
155+
const Alloc& Ax);
160156
161157
template <class Fx, class Alloc>
162-
void assign(
163-
reference_wrapper<Fx>
164-
_Fnref,
165-
const Alloc& Ax);
158+
void assign(
159+
reference_wrapper<Fx> _Fnref,
160+
const Alloc& Ax);
166161
```
167162

168163
### Parameters
@@ -183,41 +178,34 @@ _Fnref,
183178

184179
```
185180
function();
186-
187181
function(nullptr_t npc);
188-
189182
function(const function& right);
190-
191183
template <class Fx>
192-
function(Fx _Func);
193-
184+
function(Fx _Func);
194185
template <class Fx>
195-
function(reference_wrapper<Fx>
196-
_Fnref);
197-
186+
function(reference_wrapper<Fx> _Fnref);
198187
template <class Fx, class Alloc>
199-
function(
200-
Fx _Func,
201-
const Alloc& Ax);
188+
function(
189+
Fx _Func,
190+
const Alloc& Ax);
202191
203192
template <class Fx, class Alloc>
204-
function(
205-
reference_wrapper<Fx>
206-
_Fnref,
207-
const Alloc& Ax);
193+
function(
194+
reference_wrapper<Fx> _Fnref,
195+
const Alloc& Ax);
208196
```
209197

210198
### Parameters
211199
` right`
212200
The function object to copy.
213201

214-
Fx
202+
`Fx`
215203
The type of the callable object.
216204

217205
`_Func`
218206
The callable object to wrap.
219207

220-
Alloc
208+
`Alloc`
221209
The allocator type.
222210

223211
`Ax`
@@ -302,7 +290,8 @@ g is empty (correct).
302290
## <a name="function__operator_unspecified"></a> function::operator unspecified
303291
Tests if stored callable object exists.
304292

305-
``` operator unspecified();
293+
```
294+
operator unspecified();
306295
```
307296

308297
### Remarks
@@ -330,8 +319,7 @@ int main()
330319
std::cout << std::boolalpha << "not empty == " << (bool)fn1 << std::endl;
331320

332321
return (0);
333-
}
334-
322+
}
335323
```
336324
337325
```Output
@@ -343,7 +331,8 @@ not empty == true
343331
Calls a callable object.
344332

345333
```
346-
result_type operator()(T1 t1,
334+
result_type operator()(
335+
T1 t1,
347336
T2 t2, ...,
348337
TN tN);
349338
```
@@ -379,7 +368,6 @@ int main()
379368

380369
return (0);
381370
}
382-
383371
```
384372
385373
```Output
@@ -392,15 +380,11 @@ val == -3
392380

393381
```
394382
function& operator=(null_ptr_type npc);
395-
396383
function& operator=(const function& right);
397-
398384
template <class Fty>
399-
function& operator=(Fty fn);
400-
385+
function& operator=(Fty fn);
401386
template <class Fty>
402-
function& operator=(reference_wrapper<Fty>
403-
fnref);
387+
function& operator=(reference_wrapper<Fty> fnref);
404388
```
405389

406390
### Parameters
@@ -456,7 +440,6 @@ int main()
456440

457441
return (0);
458442
}
459-
460443
```
461444
462445
```Output
@@ -504,7 +487,6 @@ int main()
504487

505488
return (0);
506489
}
507-
508490
```
509491
510492
```Output
@@ -556,7 +538,6 @@ int main()
556538

557539
return (0);
558540
}
559-
560541
```
561542
562543
```Output
@@ -574,10 +555,9 @@ val == -3
574555

575556
```
576557
template <class Fty2>
577-
Fty2 *target();
578-
558+
Fty2 *target();
579559
template <class Fty2>
580-
const Fty2 *target() const;
560+
const Fty2 *target() const;
581561
```
582562

583563
### Parameters
@@ -664,7 +644,6 @@ int main()
664644

665645
return (0);
666646
}
667-
668647
```
669648
670649
```Output

0 commit comments

Comments
 (0)