From 9f8b65a70e37ba0805c91efdaa88d150c2a6a1d2 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 6 Feb 2023 23:03:45 +0100 Subject: 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. --- FL/fl_attr.h | 23 ++++++++++++++++++----- 1 file 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) -- cgit v1.2.3