You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: windows-apps-src/cpp-and-winrt-apis/faq.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ ms.localizationpriority: medium
10
10
# Frequently-asked questions about C++/WinRT
11
11
Answers to questions that you're likely to have about authoring and consuming Windows Runtime APIs with [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/intro-to-using-cpp-with-winrt).
12
12
13
+
> [!IMPORTANT]
14
+
> For release notes about C++/WinRT, see [News, and changes, in C++/WinRT 2.0](news.md#news-and-changes-in-cwinrt-20).
15
+
13
16
> [!NOTE]
14
17
> If your question is about an error message that you've seen, then also see the [Troubleshooting C++/WinRT](troubleshooting.md) topic.
Copy file name to clipboardExpand all lines: windows-apps-src/cpp-and-winrt-apis/news.md
+60-1Lines changed: 60 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
description: News and changes to C++/WinRT.
3
3
title: What's new in C++/WinRT
4
-
ms.date: 04/23/2019
4
+
ms.date: 03/16/2020
5
5
ms.topic: article
6
6
keywords: windows 10, uwp, standard, c++, cpp, winrt, projection, news, what's, new
7
7
ms.localizationpriority: medium
@@ -12,6 +12,65 @@ ms.custom: RS5
12
12
13
13
As subsequent versions of C++/WinRT are released, this topic describes what's new, and what's changed.
14
14
15
+
## Rollup of recent improvements/additions as of March 2020
16
+
17
+
### Up to 23% shorter build times
18
+
19
+
The C++/WinRT and C++ compiler teams have collaborated to do everything possible to shorten build times. We've pored over compiler analytics to figure out how the internals of C++/WinRT can be restructured to help the C++ compiler eliminate compile-time overhead, as well as how the C++ compiler itself can be improved to handle the C++/WinRT library. C++/WinRT has been optimized for the compiler; and the compiler has been optimized for C++/WinRT.
20
+
21
+
Let's take for example the worst case scenario of building a pre-compiled header (PCH) that contains every single C++/WinRT projection namespace header.
22
+
23
+
| Version | PCH size (bytes) | Time (s) |
24
+
| - | - | - |
25
+
| C++/WinRT from July, with Visual C++ 16.3 | 3,004,104,632 | 31 |
26
+
| version 2.0.200316.3 of C++/WinRT, with Visual C++ 16.5 | 2,393,515,336 | 24 |
27
+
28
+
A 20% reduction in size, and a 23% reduction in build time.
29
+
30
+
### Improved MSBuild support
31
+
32
+
We've invested a lot of work into improving [MSBuild](/visualstudio/msbuild/msbuild?view=vs-2019) support for a large selection of different scenarios.
33
+
34
+
### Even faster factory caching
35
+
36
+
We've improved inlining of the factory cache in order to better inline hot paths, which leads to faster execution.
37
+
38
+
That improvement doesn't affect code size—as described below in [Optimized EH code-gen](#optimized-exception-handling-eh-code-generation), if your application uses C++ exception handling heavily, then you can shrink your binary by using the `/d2FH4` option, which is on by default in new projects created with Visual Studio 2019 16.3, and later.
39
+
40
+
### More efficient boxing
41
+
42
+
When used in a XAML application, [**winrt::box_value**](/uwp/cpp-ref-for-winrt/box-value) is now more efficient (see [Boxing and unboxing](/windows/uwp/cpp-and-winrt-apis/boxing)). Applications that do a lot of boxing will also notice a reduction in code size.
43
+
44
+
### Support for implementing COM interfaces that implement IInspectable
45
+
46
+
If you need to implement a (non-Windows-Runtime) COM interface that just happens to implement [**IInspectable**](/windows/win32/api/inspectable/nn-inspectable-iinspectable), then you can now do so with C++/WinRT. See [COM interfaces that implement IInspectable](https://github.com/microsoft/xlang/pull/603).
47
+
48
+
### Module-locking improvements
49
+
50
+
Control over module-locking now allows both custom hosting scenarios and the elimination of module-level locking altogether. See [Module-locking improvements](https://github.com/microsoft/xlang/pull/583).
51
+
52
+
### Support for non-Windows-Runtime error information
53
+
54
+
Some APIs (even some Windows Runtime APIs) report errors without using Windows Runtime error origination APIs. In cases like that, C++/WinRT now falls back to using COM error info. See [C++/WinRT support for non-WinRT error information](https://github.com/microsoft/xlang/pull/582).
55
+
56
+
### Enable C++ module support
57
+
58
+
C++ module support is back, but only in an experimental form. The feature isn't complete in the C++ compiler, as yet.
59
+
60
+
### More efficient coroutine resumption
61
+
62
+
C++/WinRT coroutines already perform well, but we continue to look for ways to improve that. See [Improve scalability of coroutine resumption](https://github.com/microsoft/xlang/pull/546).
63
+
64
+
### New **when_all** and **when_any** async helpers
65
+
66
+
The **when_all** helper function creates an [**IAsyncAction**](/uwp/api/windows.foundation.iasyncaction) object that completes when all of the supplied awaitables have completed. The **when_any** helper creates an **IAsyncAction** that completes when any of the supplied awaitables have completed.
67
+
68
+
See [Add when_any async helper](https://github.com/microsoft/xlang/pull/520) and [Add when_all async helper](https://github.com/microsoft/xlang/pull/516).
69
+
70
+
### Other optimizations and additions
71
+
72
+
In addition, many bug fixes and minor optimizations and additions have been introduced, including various improvements to simplify debugging and to optimize internals and default implementations. Follow this link for an exhaustive list: [https://github.com/microsoft/xlang/pulls?q=is%3Apr+is%3Aclosed](https://github.com/microsoft/xlang/pulls?q=is%3Apr+is%3Aclosed).
73
+
15
74
## News, and changes, in C++/WinRT 2.0
16
75
17
76
For more info about the [C++/WinRT Visual Studio Extension (VSIX)](https://marketplace.visualstudio.com/items?itemName=CppWinRTTeam.cppwinrt101804264), the [Microsoft.Windows.CppWinRT NuGet package](https://www.nuget.org/packages/Microsoft.Windows.CppWinRT/), and the the `cppwinrt.exe` tool—including how to acquire and install them—see [Visual Studio support for C++/WinRT, XAML, the VSIX extension, and the NuGet package](intro-to-using-cpp-with-winrt.md#visual-studio-support-for-cwinrt-xaml-the-vsix-extension-and-the-nuget-package).
0 commit comments