Visual Studio

Microsoft Visual Studio is an IDE suite containing the Microsoft Visual C++ compiler MSVC. MSVC is a popular C/C++ compiler for Windows that in recent years has become at the leading edge of language standard compliance. Due to the four-decade legacy of MSVC and development completely independent of other leading compilers such as GCC and Clang, there are numerous headers and syntax specific to MSVC. A key technique for loading MSVC-specific headers and functions is to check for existence of preprocessor macro _MSC_VER.

#ifdef _MSC_VER
#include <crtdbg.h>
#endif

Some projects that have been developed mostly in non-Windows environments may have overly broad preprocessor checks e.g. #ifdef _WIN32 that can be refined to specifically enable MinGW GCC, Intel oneAPI as well as MSVC on Windows.

2024

2023

2022

2021

2020

2019