diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-02-06 23:03:45 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-02-06 23:03:45 +0100 |
| commit | 9f8b65a70e37ba0805c91efdaa88d150c2a6a1d2 (patch) | |
| tree | 86502f9026df95e900866ef381e2fd8293073bf3 | |
| parent | 160eb2926d9dad336e37b5e4752fffea0c79bd13 (diff) | |
Document MSVC macro _MSVC_LANG for future use in fl_attr.h
This macro defines the C++ standard used by the compiler since
Visual Studio 2015 Update 3.
| -rw-r--r-- | FL/fl_attr.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/FL/fl_attr.h b/FL/fl_attr.h index 88e03a90a..3a7378202 100644 --- a/FL/fl_attr.h +++ b/FL/fl_attr.h @@ -63,12 +63,25 @@ /* - Declare macros specific to Visual Studio. + Declare macros specific to Visual Studio. - Visual Studio defines __cplusplus = '199711L' in all its versions which is - not helpful for us here. For VS version number encoding see: - https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros - */ + Visual Studio defines __cplusplus = '199711L' in all its versions which is + not helpful for us here. For VS version number encoding see: + https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros + + This document specifies that the macro _MSVC_LANG is defined since + "Visual Studio 2015 Update 3" as 201402L (default) and undefined in + earlier versions. It can be used to determine the C++ standard as + specified by the /std:c++ compiler option: + + - /std:c++14 201402L (also if /std:c++ is not used) + - /std:c++17 201703L + - /std:c++20 202002L + - /std:c++latest a "higher, unspecified value" (docs of VS 2022) + + As of this writing (02/2023) _MSVC_LANG is not yet used in this file + but it is documented for future use. +*/ #if defined(_MSC_VER) |
