Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:54:44

0001 // Copyright (c) 2017-2023, University of Cincinnati, developed by Henry Schreiner
0002 // under NSF AWARD 1414736 and by the respective contributors.
0003 // All rights reserved.
0004 //
0005 // SPDX-License-Identifier: BSD-3-Clause
0006 
0007 #pragma once
0008 
0009 // [CLI11:macros_hpp:verbatim]
0010 
0011 // The following version macro is very similar to the one in pybind11
0012 #if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER)
0013 #if __cplusplus >= 201402L
0014 #define CLI11_CPP14
0015 #if __cplusplus >= 201703L
0016 #define CLI11_CPP17
0017 #if __cplusplus > 201703L
0018 #define CLI11_CPP20
0019 #endif
0020 #endif
0021 #endif
0022 #elif defined(_MSC_VER) && __cplusplus == 199711L
0023 // MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully implemented)
0024 // Unless you use the /Zc:__cplusplus flag on Visual Studio 2017 15.7 Preview 3 or newer
0025 #if _MSVC_LANG >= 201402L
0026 #define CLI11_CPP14
0027 #if _MSVC_LANG > 201402L && _MSC_VER >= 1910
0028 #define CLI11_CPP17
0029 #if _MSVC_LANG > 201703L && _MSC_VER >= 1910
0030 #define CLI11_CPP20
0031 #endif
0032 #endif
0033 #endif
0034 #endif
0035 
0036 #if defined(CLI11_CPP14)
0037 #define CLI11_DEPRECATED(reason) [[deprecated(reason)]]
0038 #elif defined(_MSC_VER)
0039 #define CLI11_DEPRECATED(reason) __declspec(deprecated(reason))
0040 #else
0041 #define CLI11_DEPRECATED(reason) __attribute__((deprecated(reason)))
0042 #endif
0043 
0044 // GCC < 10 doesn't ignore this in unevaluated contexts
0045 #if !defined(CLI11_CPP17) ||                                                                                           \
0046     (defined(__GNUC__) && !defined(__llvm__) && !defined(__INTEL_COMPILER) && __GNUC__ < 10 && __GNUC__ > 4)
0047 #define CLI11_NODISCARD
0048 #else
0049 #define CLI11_NODISCARD [[nodiscard]]
0050 #endif
0051 
0052 /** detection of rtti */
0053 #ifndef CLI11_USE_STATIC_RTTI
0054 #if(defined(_HAS_STATIC_RTTI) && _HAS_STATIC_RTTI)
0055 #define CLI11_USE_STATIC_RTTI 1
0056 #elif defined(__cpp_rtti)
0057 #if(defined(_CPPRTTI) && _CPPRTTI == 0)
0058 #define CLI11_USE_STATIC_RTTI 1
0059 #else
0060 #define CLI11_USE_STATIC_RTTI 0
0061 #endif
0062 #elif(defined(__GCC_RTTI) && __GXX_RTTI)
0063 #define CLI11_USE_STATIC_RTTI 0
0064 #else
0065 #define CLI11_USE_STATIC_RTTI 1
0066 #endif
0067 #endif
0068 
0069 /** Inline macro **/
0070 #ifdef CLI11_COMPILE
0071 #define CLI11_INLINE
0072 #else
0073 #define CLI11_INLINE inline
0074 #endif
0075 // [CLI11:macros_hpp:end]