Skip to content

Commit b523c7c

Browse files
authored
Merge branch 'live' into master
2 parents 3ec1d39 + 305e1f9 commit b523c7c

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

docs/build/reference/permissive-standards-conformance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ auto x = cond ? "A" : s;
291291
auto y = cond ? "A" : static_cast<const char*>(s);
292292
```
293293
294-
Another case where you may see errors is in conditional optators with one argument of type `void`. This case may be common in ASSERT-like macros.
294+
Another case where you may see errors is in conditional operators with one argument of type `void`. This case may be common in ASSERT-like macros.
295295
296296
```cpp
297297
// Example 3: void arguments
@@ -356,4 +356,4 @@ int main()
356356

357357
## See Also
358358
[Compiler Options](../../build/reference/compiler-options.md)
359-
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)
359+
[Setting Compiler Options](../../build/reference/setting-compiler-options.md)

docs/cpp/ellipses-and-variadic-templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ template <typename First, typename... Rest> returntype functionname(const First&
114114
template<typename... Arguments>
115115
void tfunc(const Arguments&... args)
116116
{
117-
const unsigned numargs = sizeof...(Arguments);
117+
constexpr auto numargs{ sizeof...(Arguments) };
118118

119119
X xobj[numargs]; // array of some previously defined type X
120120

docs/ide/writing-and-refactoring-code-cpp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ translation.priority.ht:
3131
- "zh-tw"
3232
---
3333
# Writing and refactoring code (C++)
34-
The Visual C++ code editor and IDE provide many coding aids. Some are unique to C++, and some are essentially the same for all Visual Studio languages. For mroe information about the shared features, see [Writing Code in the Code and Text Editor](/visualstudio/ide/writing-code-in-the-code-and-text-editor). Options for enabling and configuring C++-specific features are located in the [Text Editor C++ Advanced](/visualstudio/ide/reference/options-text-editor-c-cpp-advanced) dialog (**Tools &#124; Options &#124; Text Editor &#124; C/C++ &#124; Advanced** or type "C++ Advanced" in **Quick Launch**). After choosing which option you want to set, you can get more help by pressing **F1** when the dialog is in focus. For general code formatting options, type `Editor C++` into **QuickLaunch**.
34+
The Visual C++ code editor and IDE provide many coding aids. Some are unique to C++, and some are essentially the same for all Visual Studio languages. For more information about the shared features, see [Writing Code in the Code and Text Editor](/visualstudio/ide/writing-code-in-the-code-and-text-editor). Options for enabling and configuring C++-specific features are located in the [Text Editor C++ Advanced](/visualstudio/ide/reference/options-text-editor-c-cpp-advanced) dialog (**Tools &#124; Options &#124; Text Editor &#124; C/C++ &#124; Advanced** or type "C++ Advanced" in **Quick Launch**). After choosing which option you want to set, you can get more help by pressing **F1** when the dialog is in focus. For general code formatting options, type `Editor C++` into **QuickLaunch**.
3535

3636
Experimental features, which may or may not be included in a future version of Visual Studio, are found in the [Text Editor C++ Experimental](/visualstudio/ide/reference/options-text-editor-c-cpp-experimental) dialog. In Visual Studio 2017 you can enable **Predictive Intellisense** in this dialog.
3737

@@ -122,4 +122,4 @@ Experimental features, which may or may not be included in a future version of V
122122
### Quick Launch
123123
To easily navigate to any window or tool in Visual Studio, simply type its name in the Quick Launch window in the upper right corner of the UI. The auto-completion list will filter as you type.
124124

125-
![Visual Studio Quick Launch](../ide/media/vs2015_cpp_quick_launch.png "vs2015_cpp_quick_launch")
125+
![Visual Studio Quick Launch](../ide/media/vs2015_cpp_quick_launch.png "vs2015_cpp_quick_launch")

docs/standard-library/regular-expressions-cpp.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ Zero or more flags may be combined with the grammar to specify the regular expre
159159

160160
For all grammars except `basic` and `grep`, a repetition count can also take one of the following forms:
161161

162-
- "". Equivalent to "{0,1}".
162+
- "?". Equivalent to "{0,1}".
163163

164164
- "+". Equivalent to "{1,unbounded}".
165165

166166
Examples:
167167

168-
- "a" matches the target sequence "" and the target sequence "a", but not the target sequence "aa".
168+
- "a?" matches the target sequence "" and the target sequence "a", but not the target sequence "aa".
169169

170170
- "a+" matches the target sequence "a", the target sequence "aa", and so on, but not the target sequence "".
171171

@@ -211,7 +211,7 @@ Zero or more flags may be combined with the grammar to specify the regular expre
211211
|repetition using "{}"||+|+||+|+|
212212
|repetition using "\\{\\}"|+|||+|||
213213
|repetition using '*'|+|+|+|+|+|+|
214-
|repetition using '' and '+'||+|+||+|+|
214+
|repetition using '?' and '+'||+|+||+|+|
215215
|unicode escape sequence|||+||||
216216
|wildcard character|+|+|+|+|+|+|
217217
|word boundary assert|||+||||
@@ -323,18 +323,18 @@ Zero or more flags may be combined with the grammar to specify the regular expre
323323
### Identity Escape
324324
An identity escape is a backslash followed by a single character. It matches that character. It is required when the character has a special meaning; by using the identity escape, the special meaning is removed. For example:
325325

326-
- "a*" matches the target sequence "aaa", but does not match the target sequence "a\*".
326+
- "a\*" matches the target sequence "aaa", but does not match the target sequence "a\*".
327327

328-
- "a\\*" does not match the target sequence "aaa", but matches the target sequence "a\*".
328+
- "a\\\*" does not match the target sequence "aaa", but matches the target sequence "a\*".
329329

330330
The set of characters that are allowed in an identity escape depends on the regular expression grammar, as shown in the following table.
331331

332332
|Grammar|Allowed Identity Escape Characters|
333333
|-------------|----------------------------------------|
334-
|`basic`, `grep`|{ '(', ')', '{', '}', '.', '[', '\\', '*', '^', '$' }|
335-
|`extended`, `egrep`|{ '(', ')', '{', '.', '[', '\\', '*', '^', '$', '+', '', '&#124;' }|
334+
|`basic`, `grep`|{ '(', ')', '{', '}', '.', '[', '\\', '\*', '^', '$' }|
335+
|`extended`, `egrep`|{ '(', ')', '{', '.', '[', '\\', '\*', '^', '$', '+', '?', '&#124;' }|
336336
|`awk`|`extended` plus { '"', '/' }|
337-
|`ECMAScript`|All characters except those that can be part of an identifier. Typically, this includes letters, digits, '$', '_', and unicode escape sequences. For more information, see the ECMAScript Language Specification.|
337+
|`ECMAScript`|All characters except those that can be part of an identifier. Typically, this includes letters, digits, '$', '\_', and unicode escape sequences. For more information, see the ECMAScript Language Specification.|
338338

339339
### Individual Character
340340
An individual character in a bracket expression adds that character to the character set that is defined by the bracket expression. Anywhere in a bracket expression except at the beginning, a '^' represents itself.
@@ -372,10 +372,10 @@ Zero or more flags may be combined with the grammar to specify the regular expre
372372
A negative word boundary assert matches if the current position in the target string is not immediately after a *word boundary*.
373373

374374
### Non-capture Group
375-
A non-capture group marks its contents as a single unit in the regular expression grammar, but does not label the target text. For example, "(a)(:b)*(c) matches the target text "abbc" and associates capture group 1 with the subsequence "a" and capture group 2 with the subsequence "c".
375+
A non-capture group marks its contents as a single unit in the regular expression grammar, but does not label the target text. For example, "(a)(:b)\*(c)" matches the target text "abbc" and associates capture group 1 with the subsequence "a" and capture group 2 with the subsequence "c".
376376

377377
### Non-greedy Repetition
378-
A non-greedy repetition consumes the shortest subsequence of the target sequence that matches the pattern. A greedy repetition consumes the longest. For example, "(a+)(a*b)" matches the target sequence "aaab". When a non-greedy repetition is used, it associates capture group 1 with the subsequence "a" at the beginning of the target sequence and capture group 2 with the subsequence "aab" at the end of the target sequence. When a greedy match is used, it associates capture group 1 with the subsequence "aaa" and capture group 2 with the subsequence "b".
378+
A non-greedy repetition consumes the shortest subsequence of the target sequence that matches the pattern. A greedy repetition consumes the longest. For example, "(a+)(a\*b)" matches the target sequence "aaab". When a non-greedy repetition is used, it associates capture group 1 with the subsequence "a" at the beginning of the target sequence and capture group 2 with the subsequence "aab" at the end of the target sequence. When a greedy match is used, it associates capture group 1 with the subsequence "aaa" and capture group 2 with the subsequence "b".
379379

380380
### Octal Escape Sequence
381381
An octal escape sequence is a backslash followed by one, two, or three octal digits (0-7). It matches a character in the target sequence that has the value that is specified by those digits. If all the digits are '0', the sequence is invalid. For example, "\101" matches the target sequence "A" when ASCII character encoding is used.
@@ -385,23 +385,23 @@ Zero or more flags may be combined with the grammar to specify the regular expre
385385

386386
In `ECMAScript`, the following characters have special meanings:
387387

388-
- ^ $ \ . * + ( ) [ ] { } &#124;
388+
- ^ $ \ . * + ? ( ) [ ] { } &#124;
389389

390390
In `basic` and `grep`, the following characters have special meanings:
391391

392392
- . [ \
393393

394394
Also in `basic` and `grep`, the following characters have special meanings when they are used in a particular context:
395395

396-
- '*' has a special meaning in all cases except when it is the first character in a regular expression or the first character that follows an initial '^' in a regular expression, or when it is the first character of a capture group or the first character that follows an initial '^' in a capture group.
396+
- '\*' has a special meaning in all cases except when it is the first character in a regular expression or the first character that follows an initial '^' in a regular expression, or when it is the first character of a capture group or the first character that follows an initial '^' in a capture group.
397397

398398
- '^' has a special meaning when it is the first character of a regular expression.
399399

400400
- '$' has a special meaning when it is the last character of a regular expression.
401401

402402
In `extended`, `egrep`, and `awk`, the following characters have special meanings:
403403

404-
- . [ \ ( * + { &#124;
404+
- . [ \ ( * + ? { &#124;
405405

406406
Also in `extended`, `egrep`, and `awk`, the following characters have special meanings when they are used in a particular context.
407407

@@ -418,9 +418,9 @@ Zero or more flags may be combined with the grammar to specify the regular expre
418418

419419
Examples:
420420

421-
- "(=aa)(a*)" matches the target sequence "aaaa" and associates capture group 1 with the subsequence "aaaa".
421+
- "(=aa)(a\*)" matches the target sequence "aaaa" and associates capture group 1 with the subsequence "aaaa".
422422

423-
- "(aa)(a*)" matches the target sequence "aaaa" and associates capture group 1 with the subsequence "aa" at the beginning of the target sequence and capture group 2 with the subsequence "aa" at the end of the target sequence.
423+
- "(aa)(a\*)" matches the target sequence "aaaa" and associates capture group 1 with the subsequence "aa" at the beginning of the target sequence and capture group 2 with the subsequence "aa" at the end of the target sequence.
424424

425425
- "(=aa)(a)&#124;(a)" matches the target sequence "a" and associates capture group 1 with an empty sequence (because the positive assert failed) and capture group 2 with the subsequence "a". It also matches the target sequence "aa" and associates capture group 1 with the subsequence "aa" and capture group 2 with an empty sequence.
426426

@@ -466,7 +466,7 @@ Zero or more flags may be combined with the grammar to specify the regular expre
466466
|"$&"|"&"|The character sequence that matches the entire regular expression (`[match[0].first, match[0].second)`)|
467467
|"$$"||"$"|
468468
||"\\&"|"&"|
469-
|"$`" (dollar sign followed by back quote)||The character sequence that precedes the subsequence that matches the regular expression (`[match.prefix().first, match.prefix().second)`)|
469+
|"$\`" (dollar sign followed by back quote)||The character sequence that precedes the subsequence that matches the regular expression (`[match.prefix().first, match.prefix().second)`)|
470470
|"$'" (dollar sign followed by forward quote)||The character sequence that follows the subsequence that matches the regular expression (`[match.suffix().first, match.suffix().second)`)|
471471
|"$n"|"\n"|The character sequence that matches the capture group at position `n`, where `n` is a number between 0 and 9 (`[match[n].first, match[n].second)`)|
472472
||"\\\n"|"\n"|

0 commit comments

Comments
 (0)