From eceab3dd56f6f19e5de5e35590cf3aa7653cc85e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 6 Jan 2021 10:06:10 +0100 Subject: Fix MSVC 2019 16.8.3 --with-latest-c++ two-phase name lookup issues > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(105): error C2660: '`anonymous-namespace'::WriteLogElem': function does not take 5 arguments > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(83): note: see declaration of '`anonymous-namespace'::WriteLogElem' > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(118): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLogElem(MSIHANDLE,MSIHANDLE,std::ostringstream &,UINT,const Ch *,const std::string &)' being compiled > with > [ > Ch=char > ] > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(382): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLog(MSIHANDLE,const char (&)[18],const std::string &)' being compiled > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(105): error C2660: '`anonymous-namespace'::WriteLogElem': function does not take 6 arguments > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(83): note: see declaration of '`anonymous-namespace'::WriteLogElem' > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(118): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLogElem(MSIHANDLE,MSIHANDLE,std::ostringstream &,UINT,const Ch *,const std::string &,const char (&)[6])' being compiled > with > [ > Ch=char > ] > C:/lo/core/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx(516): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLog(MSIHANDLE,const char (&)[19],const std::string &,const char (&)[6])' being compiled and > C:/lo/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx(104): error C2660: '`anonymous-namespace'::WriteLogElem': function does not take 5 arguments > C:/lo/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx(82): note: see declaration of '`anonymous-namespace'::WriteLogElem' > C:/lo/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx(117): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLogElem(MSIHANDLE,MSIHANDLE,std::ostringstream &,UINT,const Ch *,const std::wstring &)' being compiled > with > [ > Ch=char > ] > C:/lo/core/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx(159): note: see reference to function template instantiation 'void `anonymous-namespace'::WriteLog(MSIHANDLE,const char (&)[27],const std::wstring &)' being compiled Change-Id: I7e8c121f8589ae847c9e4fd12e218408ea9e451e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108836 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- setup_native/source/win32/customactions/inst_msu/inst_msu.cxx | 4 ++++ setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'setup_native/source') diff --git a/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx b/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx index 5dc47993a132..8adffbba6228 100644 --- a/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx +++ b/setup_native/source/win32/customactions/inst_msu/inst_msu.cxx @@ -96,6 +96,10 @@ void RecSetString(MSIHANDLE hRec, UINT nField, LPCWSTR sVal) MsiRecordSetStringW(hRec, nField, sVal); } +template +void WriteLogElem(MSIHANDLE hInst, MSIHANDLE hRec, std::ostringstream& sTmpl, UINT nField, + const S1& elem, const SOther&... others); + template void WriteLogElem(MSIHANDLE hInst, MSIHANDLE hRec, std::ostringstream& sTmpl, UINT nField, const Ch* elem, const SOther&... others) diff --git a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx index e7e7013f3471..b1e204a80d12 100644 --- a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx +++ b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx @@ -95,6 +95,10 @@ void RecSetString(MSIHANDLE hRec, UINT nField, LPCWSTR sVal) MsiRecordSetStringW(hRec, nField, sVal); } +template +void WriteLogElem(MSIHANDLE hInst, MSIHANDLE hRec, std::ostringstream& sTmpl, UINT nField, + const S1& elem, const SOther&... others); + template void WriteLogElem(MSIHANDLE hInst, MSIHANDLE hRec, std::ostringstream& sTmpl, UINT nField, const Ch* elem, const SOther&... others) -- cgit