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

Stephan Bergmann sbergman at redhat.com
Mon Dec 19 16:35:08 UTC 2016


 include/vcl/vclptr.hxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 2eb121bd153c77725b759d457721efc39e5f21f6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Dec 19 17:32:13 2016 +0100

    MSVC 2015 apparently fails the sizeof(incomplete) SFINAE trick
    
    ...at least with --disable-pch it complained
    
    > [build CXX] canvas/source/directx/dx_bitmapcanvashelper.cxx
    > C:/lo/core/include\vcl/vclptr.hxx(98): error C2027: use of undefined type 'OutputDevice'
    > c:\lo\core\canvas\source\directx\dx_devicehelper.hxx(33): note: see declaration of 'OutputDevice'
    > c:\lo\core\canvas\source\directx\dx_devicehelper.hxx(109): note: see reference to class template instantiation 'VclPtr<OutputDevice>' being compiled
    
    Change-Id: I3ba90acdb632fc209b8137818e30fb771ba0807c

diff --git a/include/vcl/vclptr.hxx b/include/vcl/vclptr.hxx
index 22679e6..31f97dc 100644
--- a/include/vcl/vclptr.hxx
+++ b/include/vcl/vclptr.hxx
@@ -65,7 +65,8 @@ public:
     typedef typename C< value, void *, void >::t t;
 };
 
-#if HAVE_CXX11_CONSTEXPR
+#if HAVE_CXX11_CONSTEXPR \
+    && !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
 
 template<typename>
 constexpr bool isIncompleteOrDerivedFromVclReferenceBase(...) { return true; }
@@ -92,7 +93,8 @@ namespace detail {
 template <class reference_type>
 class VclPtr
 {
-#if HAVE_CXX11_CONSTEXPR
+#if HAVE_CXX11_CONSTEXPR \
+    && !(defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__)
     static_assert(
         vcl::detail::isIncompleteOrDerivedFromVclReferenceBase<reference_type>(
             nullptr),


More information about the Libreoffice-commits mailing list