From 19245ce805162c7b2c35a9b336aa470a500d4a06 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 2 Jun 2020 08:01:04 -0700 Subject: [PATCH] sharedVector extend base_ptr() to VS2013 --- src/misc/pv/sharedVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/pv/sharedVector.h b/src/misc/pv/sharedVector.h index 66236b3..fa426a7 100644 --- a/src/misc/pv/sharedVector.h +++ b/src/misc/pv/sharedVector.h @@ -544,11 +544,11 @@ private: /* Hack alert. * For reasons of simplicity and efficiency, we want to use raw pointers for iteration. * However, shared_ptr::get() isn't defined when !m_sdata, although practically it gives NULL. - * Unfortunately, many of the MSVC (<= VS 2010) STL methods assert() that iterators are never NULL. + * Unfortunately, many of the MSVC (<= VS 2013) STL methods assert() that iterators are never NULL. * So we fudge here by abusing 'this' so that our iterators are always !NULL. */ inline E* base_ptr() const { -#if defined(_MSC_VER) && _MSC_VER<=1600 +#if defined(_MSC_VER) && _MSC_VER<=1800 return this->m_count ? this->m_sdata.get() : (E*)(this-1); #else return this->m_sdata.get();