How to Check C++ Version
When working with C++ there are two versions we care about: What C++ standard are we using? What C++ compiler are we using? In this article I will show how to check both of these versions. How to Check C++ Standard Version First, is how to check the C++ standard version. The C++ language defines the following values corresponding C++ Standard Version __cplusplus C++98 199711L C++11 201103L C++14 201402L C++17 201703L C++20 202002L C++23 202302L The format __cplusplus is defined as a integer literal in the form YEARMONTH. For example, in C++23 __cplusplus is defined as 202302L, referring to Febraury 2023 (year=2023, month=02). This is roughly the date the committe approves the standard and it begins to go through the next stages of the ISO/IEC process. ...