chrono_parse
Loading...
Searching...
No Matches
Macros
definitions.hpp File Reference

Defines macros for compiler and standard support detection. More...

Go to the source code of this file.

Macros

#define MGUTILITY_CPLUSPLUS   __cplusplus
 Defines the MGUTILITY_CPLUSPLUS macro for MSVC and other compilers.
 
#define MGUTILITY_CNSTXPR_CLANG_WA
 Defines the MGUTILITY_CNSTXPR macro based on the C++ standard.
 
#define MGUTILITY_CNSTEVL
 Defines the MGUTILITY_CNSTEVL macro based on the C++ standard.
 

Detailed Description

Defines macros for compiler and standard support detection.

Macro Definition Documentation

◆ MGUTILITY_CNSTEVL

#define MGUTILITY_CNSTEVL

Defines the MGUTILITY_CNSTEVL macro based on the C++ standard.

If the C++ standard is newer than C++17, MGUTILITY_CNSTEVL is defined as consteval. Otherwise, it is defined as empty.

◆ MGUTILITY_CNSTXPR_CLANG_WA

#define MGUTILITY_CNSTXPR_CLANG_WA

Defines the MGUTILITY_CNSTXPR macro based on the C++ standard.

If the C++ standard is C++11, MGUTILITY_CNSTXPR is defined as empty. If the C++ standard is newer than C++11, MGUTILITY_CNSTXPR is defined as constexpr. If the C++ standard is older than C++11, an error is raised.

Defines the MGUTILITY_CNSTXPR_CLANG_WA macro based on the C++ standard.

If the C++ standard is newer than C++17 and the compiler is not Clang, MGUTILITY_CNSTXPR_CLANG_WA is defined as constexpr. Otherwise, it is defined as empty.

◆ MGUTILITY_CPLUSPLUS

#define MGUTILITY_CPLUSPLUS   __cplusplus

Defines the MGUTILITY_CPLUSPLUS macro for MSVC and other compilers.

For MSVC, it uses _MSVC_LANG. For other compilers, it uses __cplusplus.