|
|
@@ -23,9 +23,9 @@
|
|
|
#pragma once
|
|
|
|
|
|
#ifdef URHO3D_IS_BUILDING
|
|
|
- #include "Urho3D.h"
|
|
|
+ #include "Urho3D.h"
|
|
|
#else
|
|
|
- #include <Urho3D/Urho3D.h>
|
|
|
+ #include <Urho3D/Urho3D.h>
|
|
|
#endif
|
|
|
|
|
|
// Macros with identifiers of c++ version.
|
|
|
@@ -36,16 +36,16 @@
|
|
|
|
|
|
// Macro that can be used to identify c++ version.
|
|
|
#ifndef URHO_CPLUSPLUS
|
|
|
- #if defined(_MSVC_LANG) && !defined(__clang__)
|
|
|
- // Note: VC14.0/1900 (VS2015) lacks too much from C++14
|
|
|
- #if (_MSC_VER == 1900)
|
|
|
- #define URHO_CPLUSPLUS URHO_CPP11_STANDARD
|
|
|
- #else
|
|
|
- #define URHO_CPLUSPLUS _MSVC_LANG
|
|
|
- #endif
|
|
|
- #else
|
|
|
- #define URHO_CPLUSPLUS __cplusplus
|
|
|
- #endif
|
|
|
+ #if defined(_MSVC_LANG) && !defined(__clang__)
|
|
|
+ // Note: VC14.0/1900 (VS2015) lacks too much from C++14
|
|
|
+ #if (_MSC_VER == 1900)
|
|
|
+ #define URHO_CPLUSPLUS URHO_CPP11_STANDARD
|
|
|
+ #else
|
|
|
+ #define URHO_CPLUSPLUS _MSVC_LANG
|
|
|
+ #endif
|
|
|
+ #else
|
|
|
+ #define URHO_CPLUSPLUS __cplusplus
|
|
|
+ #endif
|
|
|
#endif
|
|
|
|
|
|
// Macros with a strong guarantee of what c++ version is available.
|
|
|
@@ -54,35 +54,35 @@
|
|
|
#define URHO_CPP17_OR_LATER (URHO_CPLUSPLUS >= URHO_CPP17_STANDARD)
|
|
|
|
|
|
// Macros for specific c++ versions
|
|
|
-#if (URHO_CPLUSPLUS >= URHO_CPP11_STANDARD)
|
|
|
- // Least match
|
|
|
- #define URHO_CPP11(x) x
|
|
|
- #define URHO_CPP14(x)
|
|
|
- #define URHO_CPP17(x)
|
|
|
- // Exact match
|
|
|
- #define URHO_CPP11_ONLY(x) x
|
|
|
- #define URHO_CPP14_ONLY(x)
|
|
|
- #define URHO_CPP17_ONLY(x)
|
|
|
-#elif (URHO_CPLUSPLUS >= URHO_CPP14_STANDARD)
|
|
|
- // Least match
|
|
|
- #define URHO_CPP11(x) x
|
|
|
- #define URHO_CPP14(x) x
|
|
|
- #define URHO_CPP17(x)
|
|
|
- // Exact match
|
|
|
- #define URHO_CPP11_ONLY(x)
|
|
|
- #define URHO_CPP14_ONLY(x) x
|
|
|
- #define URHO_CPP17_ONLY(x)
|
|
|
-#elif (URHO_CPLUSPLUS >= URHO_CPP17_STANDARD)
|
|
|
- // Least match
|
|
|
- #define URHO_CPP11(x) x
|
|
|
- #define URHO_CPP14(x) x
|
|
|
- #define URHO_CPP17(x) x
|
|
|
- // Exact match
|
|
|
- #define URHO_CPP11_ONLY(x)
|
|
|
- #define URHO_CPP14_ONLY(x)
|
|
|
- #define URHO_CPP17_ONLY(x) x
|
|
|
+#if URHO_CPP11_OR_LATER
|
|
|
+ // Least match
|
|
|
+ #define URHO_CPP11(x) x
|
|
|
+ #define URHO_CPP14(x)
|
|
|
+ #define URHO_CPP17(x)
|
|
|
+ // Exact match
|
|
|
+ #define URHO_CPP11_ONLY(x) x
|
|
|
+ #define URHO_CPP14_ONLY(x)
|
|
|
+ #define URHO_CPP17_ONLY(x)
|
|
|
+#elif URHO_CPP14_OR_LATER
|
|
|
+ // Least match
|
|
|
+ #define URHO_CPP11(x) x
|
|
|
+ #define URHO_CPP14(x) x
|
|
|
+ #define URHO_CPP17(x)
|
|
|
+ // Exact match
|
|
|
+ #define URHO_CPP11_ONLY(x)
|
|
|
+ #define URHO_CPP14_ONLY(x) x
|
|
|
+ #define URHO_CPP17_ONLY(x)
|
|
|
+#elif URHO_CPP17_OR_LATER
|
|
|
+ // Least match
|
|
|
+ #define URHO_CPP11(x) x
|
|
|
+ #define URHO_CPP14(x) x
|
|
|
+ #define URHO_CPP17(x) x
|
|
|
+ // Exact match
|
|
|
+ #define URHO_CPP11_ONLY(x)
|
|
|
+ #define URHO_CPP14_ONLY(x)
|
|
|
+ #define URHO_CPP17_ONLY(x) x
|
|
|
#else
|
|
|
- #error Compiler does not support required c++ standard. How did you get here?
|
|
|
+ #error Compiler does not support required c++ standard. How did you get here?
|
|
|
#endif
|
|
|
|
|
|
// Case insensitive string comparison.
|