[Libreoffice-commits] core.git: include/systools

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 9 12:17:38 UTC 2021


 include/systools/win32/comtools.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 674bbddf720b14d1f7d173e6b5f3e08d65618ab9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Mar 9 09:40:26 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Mar 9 13:17:02 2021 +0100

    Missing "template" (clang-cl)
    
    > In file included from C:/lo-clang/core/vcl/win/dtrans/FmtFilter.cxx:37:
    > C:/lo-clang/core/include\systools/win32/comtools.hxx(72,30): error: use 'template' keyword to treat 'QueryInterface' as a dependent template name [-Werror]
    >             : COMReference(p.QueryInterface<T>(t))
    >                              ^
    >                              template
    
    Not sure why this only started to show up now with my clang-cl build on Windows.
    (The Clang warning itself is available ever since <https://github.com/llvm/
    llvm-project/commit/4e7a2c09b22bb04819702ac6b8ea8b59ca396fa5> "Improve recovery
    (error + fix-it) when parsing type dependent template name without the
    'template' keyword" from 2011; its "Also the error is downgraded to an ExtWarn
    in Microsoft mode." implies that not requiring the "template" here is a non-
    standard MSVC extension.)
    
    Change-Id: I4f8e9d6fa80871fdd212417c1b935d76ffde34c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112192
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/systools/win32/comtools.hxx b/include/systools/win32/comtools.hxx
index c37053c931b7..252c581c5794 100644
--- a/include/systools/win32/comtools.hxx
+++ b/include/systools/win32/comtools.hxx
@@ -69,7 +69,7 @@ namespace sal::systools
         // Query from IUnknown*, using COM_QUERY or COM_QUERY_THROW tags
         template <typename T2, typename TAG>
         COMReference(const COMReference<T2>& p, TAG t)
-            : COMReference(p.QueryInterface<T>(t))
+            : COMReference(p.template QueryInterface<T>(t))
         {
         }
 


More information about the Libreoffice-commits mailing list