Mercurial > minori
view dep/toml11/toml/version.hpp @ 337:a7d4e5107531
dep/animone: REFACTOR ALL THE THINGS
1: animone now has its own syntax divergent from anisthesia,
making different platforms actually have their own sections
2: process names in animone are now called `comm' (this will
probably break things). this is what its called in bsd/linux
so I'm just going to use it everywhere
3: the X11 code now checks for the existence of a UTF-8 window title
and passes it if available
4: ANYTHING THATS NOT LINUX IS 100% UNTESTED AND CAN AND WILL BREAK!
I still actually need to test the bsd code. to be honest I'm probably
going to move all of the bsds into separate files because they're
all essentially different operating systems at this point
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Wed, 19 Jun 2024 12:51:15 -0400 |
parents | 3b355fa948c7 |
children |
line wrap: on
line source
#ifndef TOML11_VERSION_HPP #define TOML11_VERSION_HPP // This file checks C++ version. #ifndef __cplusplus # error "__cplusplus is not defined" #endif // Since MSVC does not define `__cplusplus` correctly unless you pass // `/Zc:__cplusplus` when compiling, the workaround macros are added. // Those enables you to define version manually or to use MSVC specific // version macro automatically. // // The value of `__cplusplus` macro is defined in the C++ standard spec, but // MSVC ignores the value, maybe because of backward compatibility. Instead, // MSVC defines _MSVC_LANG that has the same value as __cplusplus defined in // the C++ standard. First we check the manual version definition, and then // we check if _MSVC_LANG is defined. If neither, use normal `__cplusplus`. // // FYI: https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-170 // https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170 // #if defined(TOML11_ENFORCE_CXX11) # define TOML11_CPLUSPLUS_STANDARD_VERSION 201103L #elif defined(TOML11_ENFORCE_CXX14) # define TOML11_CPLUSPLUS_STANDARD_VERSION 201402L #elif defined(TOML11_ENFORCE_CXX17) # define TOML11_CPLUSPLUS_STANDARD_VERSION 201703L #elif defined(TOML11_ENFORCE_CXX20) # define TOML11_CPLUSPLUS_STANDARD_VERSION 202002L #elif defined(_MSVC_LANG) && defined(_MSC_VER) && 1910 <= _MSC_VER # define TOML11_CPLUSPLUS_STANDARD_VERSION _MSVC_LANG #else # define TOML11_CPLUSPLUS_STANDARD_VERSION __cplusplus #endif #if TOML11_CPLUSPLUS_STANDARD_VERSION < 201103L && _MSC_VER < 1900 # error "toml11 requires C++11 or later." #endif #endif// TOML11_VERSION_HPP