Skip to content

Commit 2909524

Browse files
authored
Merge pull request #5548 from Rageking8/add-forward-slash-for-std-compiler-options
Add forward slash for `/std` compiler options
2 parents a6b6fe9 + 4cf2343 commit 2909524

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

docs/cpp/nothrow-cpp.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: nothrow (C++)"
32
title: "nothrow (C++)"
4-
ms.date: "01/03/2018"
3+
description: "Learn more about: nothrow (C++)"
4+
ms.date: 01/03/2018
55
f1_keywords: ["nothrow_cpp"]
66
helpviewer_keywords: ["__declspec keyword [C++], nothrow", "nothrow __declspec keyword"]
7-
ms.assetid: 0a475139-459c-4ec6-99e8-7ecd0d7f44a3
87
---
98
# `nothrow` (C++)
109

@@ -20,7 +19,7 @@ A **`__declspec`** extended attribute which can be used in the declaration of fu
2019

2120
We recommend that all new code use the [`noexcept`](noexcept-cpp.md) operator rather than `__declspec(nothrow)`.
2221

23-
This attribute tells the compiler that the declared function and the functions it calls never throw an exception. However, it does not enforce the directive. In other words, it never causes [`std::terminate`](../standard-library/exception-functions.md#terminate) to be invoked, unlike **`noexcept`**, or in **`std:c++17`** mode (Visual Studio 2017 version 15.5 and later), `throw()`.
22+
This attribute tells the compiler that the declared function and the functions it calls never throw an exception. However, it does not enforce the directive. In other words, it never causes [`std::terminate`](../standard-library/exception-functions.md#terminate) to be invoked, unlike **`noexcept`**, or in **`/std:c++17`** mode (Visual Studio 2017 version 15.5 and later), `throw()`.
2423

2524
With the synchronous exception handling model, now the default, the compiler can eliminate the mechanics of tracking the lifetime of certain unwindable objects in such a function, and significantly reduce the code size. Given the following preprocessor directive, the three function declarations below are equivalent in **`/std:c++14`** mode:
2625

docs/standard-library/basic-string-view-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ If a function is asked to generate a sequence longer than [`max_size`](#max_size
138138

139139
## Requirements
140140

141-
[`std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.
141+
[`/std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.
142142

143143
**Header:** `<string_view>`
144144

@@ -1013,7 +1013,7 @@ Null-terminated character string containing the prefix to look for.
10131013
10141014
### Remarks
10151015
1016-
`starts_with()` is new in C++20. To use it, specify the [`std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option.
1016+
`starts_with()` is new in C++20. To use it, specify the [`/std:c++20`](../build/reference/std-specify-language-standard-version.md) or later compiler option.
10171017
10181018
See [`ends_with`](#ends_with) to see if a string ends with a suffix.
10191019

docs/standard-library/string-view.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ helpviewer_keywords: ["string_view header"]
66
---
77
# `<string_view>`
88

9-
Defines the class template `basic_string_view` and related types and operators. (Requires compiler option [`std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.)
9+
Defines the class template `basic_string_view` and related types and operators. (Requires compiler option [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.)
1010

1111
## Syntax
1212

@@ -60,7 +60,7 @@ The `<string_view>` operators can compare `string_view` objects to objects of an
6060

6161
- **Namespace:** `std`
6262

63-
- **Compiler Option:** [`std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.
63+
- **Compiler Option:** [`/std:c++17`](../build/reference/std-specify-language-standard-version.md) or later.
6464

6565
## See also
6666

0 commit comments

Comments
 (0)