Kaydet (Commit) 2eb121bd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 5bc94f60
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment