Skip to content

Commit 66b513f

Browse files
authored
Merge pull request MicrosoftDocs#2094 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to master to sync with https://github.com/MicrosoftDocs/cpp-docs (branch master)
2 parents 16ed92e + 4e593c1 commit 66b513f

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

docs/intrinsics/debugbreak.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ main() {
5050

5151
on an x86 computer.
5252

53+
On ARM64, the `__debugbreak` intrinsic is compiled into the instruction `brk #0xF000`.
54+
5355
This routine is only available as an intrinsic.
5456

5557
**END Microsoft Specific**

docs/standard-library/algorithm-functions.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int main()
203203
```
204204

205205
```Output
206-
L = ( 50 40 10 20 20 )
206+
li = ( 50 40 10 20 20 )
207207
All the elements are even numbers.
208208
```
209209

@@ -270,7 +270,7 @@ int main()
270270
```
271271

272272
```Output
273-
L = ( 51 41 11 21 20 )
273+
li = ( 51 41 11 21 20 )
274274
There's an even element in li.
275275
```
276276

@@ -658,6 +658,35 @@ Returns an output iterator where elements have been copied to. It is the same as
658658

659659
The template function evaluates `*(dest + N) = *(first + N))` once for each `N` in the range `[0, count)`, for strictly increasing values of `N` starting with the lowest value. It then returns `dest + N`. If *dest* and *first* designate regions of storage, *dest* must not be in the range `[first, last)`.
660660

661+
### Example
662+
663+
```cpp
664+
// alg_copy_n.cpp
665+
// compile with: cl /EHsc /W4 alg_copy_n.cpp
666+
#include <algorithm>
667+
#include <iostream>
668+
#include <string>
669+
670+
int main()
671+
{
672+
using namespace std;
673+
string s1{"dandelion"};
674+
string s2{"badger"};
675+
676+
cout << s1 << " + " << s2 << " = ";
677+
678+
// Copy the first 3 letters from s1
679+
// to the first 3 positions in s2
680+
copy_n(s1.begin(), 3, s2.begin());
681+
682+
cout << s2 << endl;
683+
}
684+
```
685+
686+
```Output
687+
dandelion + badger = danger
688+
```
689+
661690
## <a name="count"></a> count
662691

663692
Returns the number of elements in a range whose values match a specified value.

0 commit comments

Comments
 (0)