A Multitude of Updates in Visual Studio 2019 version 16.8 Preview 3

Sy Brand

Visual Studio 2019 version 16.8 Preview 3 comes with a huge collection of updates for C++ programmers. Download today to try out new additions in conformance, performance, and productivity.

C++20

We’ve improved support for major C++20 features across our compiler, standard library, and IDE. You can now use Modules, Concepts, Coroutines, and (some of) Ranges all in the same project!

C++20 Coroutines are now feature-complete and available under /std:c++latest. When using C++20 Coroutines you should include the <coroutine> header. Support for our legacy behaviour is available under <experimental/coroutine> and the /await switch. Read more details in our C++20 Coroutines blogpost.

C++20 Modules are also feature-complete and available under /std:c++latest. This includes header units and experimental MSBuild support which will work out your module dependencies automatically and ensure they are built in the right order. Learn more in our C++20 Modules blogpost.

We now support the majority of C++20 Ranges and are working hard to complete all features. This release includes support for most of the range-based algorithms. You can track progress on this GitHub issue.

Outside of Ranges, this release brings several new STL features and optimizations. Some examples:

You can find all the STL updates in our Changelog.

IntelliSense now provides support for C++20 <concepts> and <ranges> headers, and rename and browsing for concept definitions. There is a known issue that we expect to address in Preview 4.

Conditionally trivial special member functions are now supported in MSVC.

C11/C17

All required features of C11 and C17 are now supported using the /std:c11 and /std:c17 switches. This includes:

  • _Pragma
  • restrict
  • _Noreturn and <stdnoreturn.h>
  • _Alignas, _Alignof and <stdalign.h>
  • _Generic and <tgmath.h> support
  • _Static_assert

Note that the optional features are not supported, so we do not claim C99 compliance. Learn more in our C11/C17 blogpost.

vcpkg

vcpkg now supports binary caching and manifest files.

Manifests are files with the filename vcpkg.json that should be present in your project directory and can easily be checked into source control. They allow you to declare your library dependencies and configured so that vcpkg is automatically run as part of a pre-build step to install missing dependencies for your active build configuration.

Here is an example manifest file.

{ 
    "name": "supertux", 
    "version-string": "1.3.1", 
    "dependencies": [ 
        "boost-date-time", 
        "boost-filesystem", 
        "boost-format", 
        "boost-locale", 
        "boost-system", 
        "curl", 
        "freetype", 
        "glew", 
        "libogg", 
        "libvorbis", 
        "openal-soft", 
        "sdl2", 
        "sdl2-image" 
    ] 
}

Binary caching saves copies of your binaries when they are compiled for the first time by vcpkg. The cache location can be set anywhere from your local filesystem to a remote fileshare or artifact storage location. 

You can read more about the new features, including experimental features such as versioning and registries, in our vcpkg announcements blogpost.

CMake and Linux

We have upgraded the version of CMake shipped with Visual Studio to CMake 3.18. This will enable you to use their new CMake profiling feature, and more. Read more in their release notes.

You can now debug Linux core dumps on a remote Linux system or WSL directly from Visual Studio. This may be helpful if you run a “Windows shop” but deploy to Linux servers and want to diagnose crashes in a familiar environment.

We’ve improved our error reporting for missing build tools on Linux projects. Previously you would encounter a lot of errors when compiling, debugging, or using IntelliSense. Now you get a warning in the toolbar and a clear error telling you about the missing tools in the error view.

Productivity

New warnings and quick-fixes based on an IntelliSense-driven code linter are now available in the editor. You can configure it in Tools->Options->Text Editor->C/C++->CodeStyle->Linter + Fixups. You’ll be able to get warnings and fixes for arithmetic overflow, uninitialized local variables, converting the result of an integer division to float, and more!

Code Analysis

Our code analysis tools now support the SARIF 2.1 standard: the industry standard static analysis log format. Behind the scenes, SARIF 2.1 powers the MSVC code analysis experience in Visual Studio, including error list population in both regular and background code analysis runs, green squiggles and fix-its. In the near future, we plan to improve the IDE experience further by color coding the squiggles according to severity level (Info/Warning/Error) of each defect based on information in the SARIF logs. You can read more about the format SARIF format in the official specification.

Download Visual Studio 2019 version 16.8 Preview 3 today and give it a try. We would love to hear from you to help us prioritize and build the right features for you. We can be reached via the comments below, Developer Community, and Twitter (@VisualC). The best way to file a bug or suggest a feature is via Developer Community.

15 comments

Discussion is closed. Login to edit/delete existing comments.

  • Michael Goldshteyn 0

    It would help if you guys update your release notes on the release notes page to which you provide a link, before you make a release that shows links to them only to discover when you click on said links that the release notes page has not been updated and you can’t read the new release notes.

    Also that link to the “known issue” at https://developercommunity.visualstudio.com/content/problem/1175212/intellisense-crashes-while-processing-some-constra.html gives me an access denied error.

    • Augustin PopaMicrosoft employee 0

      Hello Michael, we apologize for the inconvenience. The release notes were supposed to go out at the same time, but it seems an issue came up that caused a delay there. The Visual Studio team is working to resolve it as soon as possible so the release notes can be made available to everyone.

      Thanks for the note on the known issue link – it seems that the report is marked as Microsoft-internal so it’s hidden. I removed the link from the post for now. There weren’t any comments beyond the initial report in that thread in any case.

  • Adrian Sims 0

    I would really like the abbreviated template function syntax like

    integral auto Square(integral auto num) 
    {
        return num * num;
    }

    Is this coming any time soon?

    • Xiang FanMicrosoft employee 0

      It was originally planned for 16.8. It will go live in 16.9.

      If you are using 16.8 preview 3, you can use the following before the full support is implemented:

      #include <concepts>
      
      #define DUMMY_TEMPLATE_HEAD template <int = 0>
      
      DUMMY_TEMPLATE_HEAD // 16.8 p3
      std::integral auto Square(std::integral auto num) 
      {
          return num * num;
      }
      
      int main()
      {
      	Square(0);
      }
      
  • Michael Taylor 0

    My ask would be that you all either work with the team that aggregates blogs onto the general dev site to either clarify what team is producing the blog article or you put C++ (or whatever team) in the blog title. When I saw this title I thought preview 16.8.3 was available and jumped to read about what has changed in VS. Then I realized this was only the C++ parts. Having these clearly indicated in either the title (a hassle probably) or shown more clearly on the aggregated dev site would help clarify this.

    • Augustin PopaMicrosoft employee 0

      Hello Michael, sorry for the inconvenience. The release notes should have been published, but the release team ran into an issue that they are working to resolve as soon as possible. The release notes should go up shortly. Unfortunately I do not have a specific ETA, but I don’t expect it should take very long.

  • Thomas Tomiczek 0

    Any specific reason you do not push that out for release? .NET 5.0 is now RC1 with go live. This preview is not really go live and supported all around. As someone who is now moving some projects into .NET 5 – I would love to NOT have to use a VS preview for working on .NET 5.0.

    • Augustin PopaMicrosoft employee 0

      Hello Thomas, I can’t speak for the .NET release process as I am not on that team, but we are going through a preview process with Visual Studio releases to give ourselves time to work on quality, performance, and avoid regressions in the experience before pushing the changes to a release channel. Because we have many developers relying on Visual Studio to work correctly, we want to take care not to break them in production environments. Unfortunately this does mean less frequent updates on the release band, but hopefully better quality ones.

  • Francisco José Sen del Prado 0

    Hello! Could you provide an estimation on when the new text format library will be released?

    Thanks in advance

    • Andrew Dinh 0

      Very Soon Maybe

  • Chris Green 0

    I think this is a bug in the new release. My d3d12 code broke when I upgraded. This error seems to be wrong:

    This line calls d3d and won’t compile:
    m_pCommandList->ResourceBarrier( 1, &CD3DX12_RESOURCE_BARRIER::Transition( pRenderTarget, RenderTargetStates[nOldState], RenderTargetStates[nNewState] ) );

    It gets:
    D:\dev\code\graphicsapi\graphicsapi_dx12\graphicsapi_dx12.cpp(1001): error C2102: ‘&’ requires l-value

    This error would make sense if ResourceBarrier took a non-const pointer. but it’s const. Its passing the address of a temporary value as a const *.

  • 志 王 0

    Exciting , Exciting, Exciting.
    Unfortunately, I have used gcc full time. Cross-platform is frustrating

    • mason harper 0

      yea it is

  • Cady Feng 0

    I am hunting for some good research blog pages. I searched through the search engines and found a website of your blog.Car Detail Chicago

Feedback usabilla icon