Fixes needed to compile swift with MSVC with the /permissive- switch

which enables more C++ standard conformance.
This commit is contained in:
Mat Sutcliffe
2018-10-28 21:55:54 +00:00
committed by Klaus Basan
parent 919a31b250
commit df563d5b29
6 changed files with 29 additions and 2 deletions

View File

@@ -279,7 +279,8 @@ namespace BlackMisc
template <size_t I>
using index = std::integral_constant<size_t, I>;
constexpr static auto members() { return MetaClass::getMemberList(); }
// Trailing return type needed to work around MSVC "function returning auto can not be used before it has been defined" with /permissive-
constexpr static auto members() -> decltype(MetaClass::getMemberList()) { return MetaClass::getMemberList(); }
};
namespace Private

View File

@@ -15,6 +15,9 @@
#if defined(Q_OS_MACOS)
#include <libproc.h>
#elif defined(Q_OS_WIN)
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <psapi.h>
#endif