diff --git a/src/xenia/base/cvar.cc b/src/xenia/base/cvar.cc index 6f9615f5f..ad092a78b 100644 --- a/src/xenia/base/cvar.cc +++ b/src/xenia/base/cvar.cc @@ -9,7 +9,10 @@ #include "xenia/base/cvar.h" #include -#define UTF_CPP_CPLUSPLUS 202002L +// https://github.com/nemtrif/utfcpp/issues/85 +#if defined(_MSVC_LANG) && _MSVC_LANG > __cplusplus +#define UTF_CPP_CPLUSPLUS _MSVC_LANG +#endif #include "third_party/utfcpp/source/utf8.h" #include "xenia/base/console.h" diff --git a/src/xenia/base/string.cc b/src/xenia/base/string.cc index 61adaff73..dbd6b5f5d 100644 --- a/src/xenia/base/string.cc +++ b/src/xenia/base/string.cc @@ -20,7 +20,10 @@ #include #endif // !XE_PLATFORM_WIN32 -#define UTF_CPP_CPLUSPLUS 202002L +// https://github.com/nemtrif/utfcpp/issues/85 +#if defined(_MSVC_LANG) && _MSVC_LANG > __cplusplus +#define UTF_CPP_CPLUSPLUS _MSVC_LANG +#endif #include "third_party/utfcpp/source/utf8.h" namespace utfcpp = utf8; diff --git a/src/xenia/base/utf8.cc b/src/xenia/base/utf8.cc index 8a3021ef1..9305f1f28 100644 --- a/src/xenia/base/utf8.cc +++ b/src/xenia/base/utf8.cc @@ -12,7 +12,10 @@ #include #include -#define UTF_CPP_CPLUSPLUS 202002L +// https://github.com/nemtrif/utfcpp/issues/85 +#if defined(_MSVC_LANG) && _MSVC_LANG > __cplusplus +#define UTF_CPP_CPLUSPLUS _MSVC_LANG +#endif #include "third_party/utfcpp/source/utf8.h" namespace utfcpp = utf8;