Xiang Fan

PRINCIPAL SOFTWARE ENGINEER, Visual C++ Compiler Front-End

Developer in Visual C++ team

Post by this author

The Future of C++ Compiler Diagnostics in MSVC and Visual Studio

We are working hard on improving the diagnostics experience in MSVC and Visual Studio. We began this work in Visual Studio 2022 version 17.3 and while not everything is ready yet, we would like to share the early progress. (image) Motivation & Principles New C++ features like concepts and ranges present the opportunity for more ...

New Compiler Warnings for Dynamic Initialization and User Defined Sections

We've added two new warnings to MSVC for misuses of binary sections reserved for the compiler. This short post will explain the issues which they warn against, and potential fixes for your code. The MSVC C++ compiler provides several ways to create sections and place data in them. The linker will convert them into the 'sections' in the PE (...

Build Throughput Series: More Efficient Template Metaprogramming

In the previous blog post I shared how template specialization and template instantiation are processed in the MSVC compiler. We will now look at some examples from real-world code bases to show some ways to reduce the number of them. Example 1 This example is extracted from our own MSVC compiler code base. The code tries to apply several ...

Build Throughput Series: Template Metaprogramming Fundamentals

Template metaprogramming is popular and seen in many code bases. However, it often contributes to long compile times. When investigating build throughput improvement opportunities in large codebases, our finding is that more than one million template specializations and template instantiations is quite common and often provides optimization ...

C++20 Concepts Are Here in Visual Studio 2019 version 16.3

C++20 Concepts are now available for the first time in Visual Studio 2019 version 16.3 Preview 2. This includes both the compiler and standard library support, but not the intellisense support.