From 61c88ae6945c241f5f2aeb844eeca0776b487132 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 19 Jan 2018 21:23:51 +0100 Subject: gbuild: always compile as C++17 with MSVC 2017 The current update MSVC 2017.5 supports fancy new C++ features, but unfortunately in its default C++14 mode it falls over and dies with an internal compiler error as soon as it sees the WeakImplHelper variadic template. In order to work around the ICE, build everything as C++17, which somehow doesn't crash. This causes loads of deprecation warnings about obsolete std::this and badly designed std::that, almost all of them from boost headers, which are well known for following every best practice in the C++ book. Liberally sprinkle macros around to suppress the warnings for now, like we already do with the other million warnings from boost headers. Change-Id: Ia6b6ef5e457b5fe3c8cfe361ba5da39376bb7c4c Reviewed-on: https://gerrit.libreoffice.org/48225 Tested-by: Jenkins Reviewed-by: Michael Stahl --- desktop/source/app/sofficemain.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'desktop/source/app/sofficemain.cxx') diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 657614962489..e27b48d8b93a 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -92,6 +92,9 @@ static bool dumpCallback(const wchar_t* path, const wchar_t* id, std::string ini_path = CrashReporter::getIniFileName(); std::ofstream minidump_file(ini_path, std::ios_base::app); // TODO: moggi: can we avoid this conversion +#ifdef _MSC_VER +#pragma warning (disable: 4996) +#endif std::wstring_convert> conv1; std::string aPath = conv1.to_bytes(std::wstring(path)) + conv1.to_bytes(std::wstring(id)) + ".dmp"; minidump_file << "DumpFile=" << aPath << "\n"; -- cgit