Xiang Fan


Developer in Visual C++ team

Post by this author

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 ...
Comments are closed.0C++

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.