Skip to content
2 changes: 1 addition & 1 deletion docs/build/reference/await-enable-coroutine-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use the **/await** compiler option to enable compiler support for coroutines.

## Remarks

The **/await** compiler option enables compiler support for C++ coroutines and the keywords **co_await**, **co_yield**, and **co_return**. This option is off by default. For information about support for coroutines in Visual Studio, see the [Visual Studio Team Blog](https://blogs.msdn.microsoft.com/vcblog/category/coroutine/). For more information about the coroutines standard proposal, see [N4628 Working Draft, Technical Specification for C++ Extensions for Coroutines](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4628.pdf).
The **/await** compiler option enables compiler support for C++ coroutines and the keywords **co_await**, **co_yield**, and **co_return**. This option is off by default. For information about support for coroutines in Visual Studio, see the [Visual Studio Team Blog](https://blogs.msdn.microsoft.com/vcblog/category/coroutine/). For more information about the coroutines standard proposal, see [N4628 Working Draft, Technical Specification for C++ Extensions for Coroutines](https://wg21.link/n4628).

The **/await** option is available beginning in Visual Studio 2015.

Expand Down
10 changes: 5 additions & 5 deletions docs/build/reference/std-specify-language-standard-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ The **/std** option is available in Visual Studio 2017 and later. It is used to

The default **/std:c++14** option enables the set of C++14 features implemented by the MSVC compiler. This option disables compiler and standard library support for features that are changed or new in more recent versions of the language standard, with the exception of some C++17 features already implemented in previous releases of the MSVC compiler. To avoid breaking changes for users who have already taken dependencies on the features available as of Visual Studio 2015 Update 2, these features remain enabled when the **/std:c++14** option is specified:

- [Rules for auto with braced-init-lists](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html)
- [Rules for auto with braced-init-lists](https://wg21.link/n3922)

- [typename in template template-parameters](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4051.html)
- [typename in template template-parameters](https://wg21.link/n4051)

- [Removing trigraphs](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4086.html)
- [Removing trigraphs](https://wg21.link/n4086)

- [Attributes for namespaces and enumerators](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4266.html)
- [Attributes for namespaces and enumerators](https://wg21.link/n4266)

- [u8 character literals](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4267.html)
- [u8 character literals](https://wg21.link/n4267)

For additional information on which C++14 and C++17 features are enabled when **/std:c++14** is specified, see the notes in [Microsoft C++ language conformance table](../../overview/visual-cpp-language-conformance.md).

Expand Down
12 changes: 6 additions & 6 deletions docs/code-quality/cpp-core-guidelines-warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The C++ Core Guidelines are a portable set of guidelines, rules, and best practi

## The C++ Core Guidelines Project

Created by Bjarne Stroustrup and others, the C++ Core Guidelines are a guide to using modern C++ safely and effectively. The Guidelines emphasize static type safety and resource safety. They identify ways to eliminate or minimize the most error-prone parts of the language, and suggest how to make your code simpler and more performant in a reliable way. These guidelines are maintained by the Standard C++ Foundation. To learn more, see the documentation, [C++ Core Guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines), and access the C++ Core Guidelines documentation project files on [GitHub](https://github.com/isocpp/CppCoreGuidelines).
Created by Bjarne Stroustrup and others, the C++ Core Guidelines are a guide to using modern C++ safely and effectively. The Guidelines emphasize static type safety and resource safety. They identify ways to eliminate or minimize the most error-prone parts of the language, and suggest how to make your code simpler and more performant in a reliable way. These guidelines are maintained by the Standard C++ Foundation. To learn more, see the documentation, [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines), and access the C++ Core Guidelines documentation project files on [GitHub](https://github.com/isocpp/CppCoreGuidelines).

## Enable the C++ Core Check guidelines in Code Analysis

Expand Down Expand Up @@ -191,29 +191,29 @@ You can run the C++ Core Checker only on specified files by using the same appro
</ItemGroup>
```

If you dont want to modify the project file, you can pass properties on the command line:
If you don't want to modify the project file, you can pass properties on the command line:

```cmd
msbuild /p:EnableCppCoreCheck=true /p:RunCodeAnalysis=true /p:CodeAnalysisRuleSet=CppCoreCheckRules.ruleset ...
```

### Non-MSBuild projects

If you use a build system that doesnt rely on MSBuild you can still run the checker, but youll need to get familiar with some internals of the Code Analysis engine configuration (which is not guaranteed to be supported in the future).
If you use a build system that doesn't rely on MSBuild you can still run the checker, but you'll need to get familiar with some internals of the Code Analysis engine configuration (which is not guaranteed to be supported in the future).

You will need to set a few environment variables and use proper command line options for the compiler. It is better to work under the "Native Tools Command Prompt" environment so that you dont have to search for specific paths for the compiler, include directories, etc.
You will need to set a few environment variables and use proper command line options for the compiler. It is better to work under the "Native Tools Command Prompt" environment so that you don't have to search for specific paths for the compiler, include directories, etc.

1. **Environment variables**
- `set esp.extensions=cppcorecheck.dll` This tells the engine to load the C++ Core Guidelines module.
- `set esp.annotationbuildlevel=ignore` This disables logic which processes SAL annotations. Annotations dont affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a lot of time). This setting is optional, but highly recommended.
- `set esp.annotationbuildlevel=ignore` This disables logic which processes SAL annotations. Annotations don't affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a lot of time). This setting is optional, but highly recommended.
- `set caexcludepath=%include%` We highly recommend that you disable warnings which fire on standard headers. You can add more paths here, for example the path to the common headers in your project.
1. **Command line options**
- `/analyze` Enables code analysis (consider also using /analyze:only and /analyze:quiet).
- `/analyze:plugin EspXEngine.dll` This option loads the Code Analysis Extensions engine into the PREfast. This engine, in turn, loads the C++ Core Guidelines Checker.

## Use the Guideline Support Library

The Guideline Support Library is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL is available at [http://www.nuget.org/packages/Microsoft.Gsl](https://www.nuget.org/packages/Microsoft.Gsl). The library is open source, so you can view the sources, make comments, or contribute. The project can be found at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL).
The Guideline Support Library is designed to help you follow the Core Guidelines. The GSL includes definitions that let you replace error-prone constructs with safer alternatives. For example, you can replace a `T*, length` pair of parameters with the `span<T>` type. The GSL is available at [https://www.nuget.org/packages/Microsoft.Gsl](https://www.nuget.org/packages/Microsoft.Gsl). The library is open source, so you can view the sources, make comments, or contribute. The project can be found at [https://github.com/Microsoft/GSL](https://github.com/Microsoft/GSL).

## <a name="vs2015_corecheck"></a> Use the C++ Core Check guidelines in Visual Studio 2015 projects

Expand Down
10 changes: 5 additions & 5 deletions docs/code-quality/using-the-cpp-core-guidelines-checkers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The C++ Core Guidelines are a portable set of guidelines, rules, and best practi

## The C++ Core Guidelines Project

Created by Bjarne Stroustrup and others, the C++ Core Guidelines are a guide to using modern C++ safely and effectively. The Guidelines emphasize static type safety and resource safety. They identify ways to eliminate or minimize the most error-prone parts of the language, and suggest how to make your code simpler and more performant in a reliable way. These guidelines are maintained by the Standard C++ Foundation. To learn more, see the documentation, [C++ Core Guidelines](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines), and access the C++ Core Guidelines documentation project files on [GitHub](https://github.com/isocpp/CppCoreGuidelines).
Created by Bjarne Stroustrup and others, the C++ Core Guidelines are a guide to using modern C++ safely and effectively. The Guidelines emphasize static type safety and resource safety. They identify ways to eliminate or minimize the most error-prone parts of the language, and suggest how to make your code simpler and more performant in a reliable way. These guidelines are maintained by the Standard C++ Foundation. To learn more, see the documentation, [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines), and access the C++ Core Guidelines documentation project files on [GitHub](https://github.com/isocpp/CppCoreGuidelines).

## Enable the C++ Core Check guidelines in Code Analysis

Expand Down Expand Up @@ -207,21 +207,21 @@ You can run the C++ Core Checker only on specified files by using the same appro
</ItemGroup>
```

If you dont want to modify the project file, you can pass properties on the command line:
If you don't want to modify the project file, you can pass properties on the command line:

```cmd
msbuild /p:EnableCppCoreCheck=true /p:RunCodeAnalysis=true /p:CodeAnalysisRuleSet=CppCoreCheckRules.ruleset ...
```

### Non-MSBuild projects

If you use a build system that doesnt rely on MSBuild you can still run the checker, but you need to get familiar with some internals of the Code Analysis engine configuration. These internals are not guaranteed to be supported in the future.
If you use a build system that doesn't rely on MSBuild you can still run the checker, but you need to get familiar with some internals of the Code Analysis engine configuration. These internals are not guaranteed to be supported in the future.

You have to set a few environment variables and use proper command-line options for the compiler. It is better to work under the "Native Tools Command Prompt" environment so that you dont have to search for specific paths for the compiler, include directories, etc.
You have to set a few environment variables and use proper command-line options for the compiler. It is better to work under the "Native Tools Command Prompt" environment so that you don't have to search for specific paths for the compiler, include directories, etc.

- **Environment variables**
- `set esp.extensions=cppcorecheck.dll` This tells the engine to load the C++ Core Guidelines module.
- `set esp.annotationbuildlevel=ignore` This disables the logic that processes SAL annotations. Annotations dont affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a long time). This setting is optional, but highly recommended.
- `set esp.annotationbuildlevel=ignore` This disables the logic that processes SAL annotations. Annotations don't affect code analysis in the C++ Core Guidelines Checker, yet their processing takes time (sometimes a long time). This setting is optional, but highly recommended.
- `set caexcludepath=%include%` We highly recommend that you disable warnings which fire on standard headers. You can add more paths here, for example the path to the common headers in your project.

- **Command line options**
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp/cpp-language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ms.assetid: 4be9cacb-c862-4391-894a-3a118c9c93ce
---
# C++ Language Reference

This reference explains the C++ programming language as implemented in the Microsoft C++ compiler. The organization is based on [*The Annotated C++ Reference Manual*](http://www.stroustrup.com/arm.html) by Margaret Ellis and Bjarne Stroustrup and on the ANSI/ISO C++ International Standard (ISO/IEC FDIS 14882). Microsoft-specific implementations of C++ language features are included.
This reference explains the C++ programming language as implemented in the Microsoft C++ compiler. The organization is based on *The Annotated C++ Reference Manual* by Margaret Ellis and Bjarne Stroustrup and on the ANSI/ISO C++ International Standard (ISO/IEC FDIS 14882). Microsoft-specific implementations of C++ language features are included.

For an overview of Modern C++ programming practices, see [Welcome Back to C++](welcome-back-to-cpp-modern-cpp.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/cpp/functions-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ auto Add2(const Lhs& lhs, const Rhs& rhs)

Note that **auto** does not preserve the const-ness of the type it deduces. For forwarding functions whose return value needs to preserve the const-ness or ref-ness of its arguments, you can use the **decltype(auto)** keyword, which uses the **decltype** type inference rules and preserves all the type information. **decltype(auto)** may be used as an ordinary return value on the left side, or as a trailing return value.

The following example (based on code from [N3493](http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3493.html)), shows **decltype(auto)** being used to enable perfect forwarding of function arguments in a return type that isn't known until the template is instantiated.
The following example (based on code from [N3493](https://wg21.link/n3493)), shows **decltype(auto)** being used to enable perfect forwarding of function arguments in a return type that isn't known until the template is instantiated.

```cpp
template<typename F, typename Tuple = tuple<T...>, int... I>
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp/range-based-for-statement-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for ( for-range-declaration : expression )

Use the range-based **for** statement to construct loops that must execute through a "range", which is defined as anything that you can iterate through—for example, `std::vector`, or any other C++ Standard Library sequence whose range is defined by a `begin()` and `end()`. The name that is declared in the `for-range-declaration` portion is local to the **for** statement and cannot be re-declared in `expression` or `statement`. Note that the [auto](../cpp/auto-cpp.md) keyword is preferred in the `for-range-declaration` portion of the statement.

**New in Visual Studio 2017:** Range-based for loops no longer require that begin() and end() return objects of the same type. This enables end() to return a sentinel object such as used by ranges as defined in the Ranges-V3 proposal. For more information, see [Generalizing the Range-Based For Loop](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0184r0.html) and the [range-v3 library on GitHub](https://github.com/ericniebler/range-v3).
**New in Visual Studio 2017:** Range-based for loops no longer require that begin() and end() return objects of the same type. This enables end() to return a sentinel object such as used by ranges as defined in the Ranges-V3 proposal. For more information, see [Generalizing the Range-Based For Loop](https://wg21.link/p0184r0) and the [range-v3 library on GitHub](https://github.com/ericniebler/range-v3).

This code shows how to use range-based **for** loops to iterate through an array and a vector:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The solution created by the template sets the Android app as the default project

The generated Android Native Activity app and library projects put the C++ shared code in a dynamic library. It includes "glue" code to interface with the Android platform. Most of the app code is in the library. The manifest, resources, and build instructions are in the packaging project. The shared code is called from main.cpp in the NativeActivity project. For more information about how to program an Android Native Activity, see the Android Developer NDK [Concepts](https://developer.android.com/ndk/guides/concepts.html) page.

Visual Studio builds Android Native Activity projects by using the Android NDK. It uses Clang as the platform toolset. Visual Studio maps the project's properties into the compile, link, and debug commands on the target platform. For details, open the **Property Pages** dialog for the MyOpenGLESApp.Android.NativeActivity project. For more information about the command-line switches, see the [Clang Compiler User's Manual](http://clang.llvm.org/docs/UsersManual.html).
Visual Studio builds Android Native Activity projects by using the Android NDK. It uses Clang as the platform toolset. Visual Studio maps the project's properties into the compile, link, and debug commands on the target platform. For details, open the **Property Pages** dialog for the MyOpenGLESApp.Android.NativeActivity project. For more information about the command-line switches, see the [Clang Compiler User's Manual](https://clang.llvm.org/docs/UsersManual.html).

## Build and run the iOS app on an iOS device

Expand Down
5 changes: 2 additions & 3 deletions docs/dotnet/auto-gcroot-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ The managed type to be embedded.
|[auto_gcroot::reset](#reset)|Destroy the current owned object and optionally take possession of a new object.|
|[auto_gcroot::swap](#swap)|Swaps objects with another `auto_gcroot`.|


### Public operators

|Name|Description|
Expand Down Expand Up @@ -757,7 +756,7 @@ operator bool() const;

### Remarks

This operator actually converts to `_detail_class::_safe_bool` which is safer than `bool` because it can't be converted to an integral type.
This operator actually converts to `_detail_class::_safe_bool`, which is safer than `bool` because it can't be converted to an integral type.

### Example

Expand Down Expand Up @@ -827,4 +826,4 @@ int main() {
s is invalid
now s is valid
now s is invalid
```
```
Loading