From 0b6b01ef83fa7100c2ebfdb82e8d5a2c14081a09 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 5 Jan 2018 11:13:56 -0800 Subject: [PATCH] shared_vector limit MSVC workaround limit 207efca15cf471bbc2990cbd336000e04dcfcd22 to MSVC <= 2010. --- 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 96efaa2..e1a2f10 100644 --- a/src/misc/pv/sharedVector.h +++ b/src/misc/pv/sharedVector.h @@ -459,11 +459,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 STL methods assert() that iterators are never NULL. + * Unfortunately, many of the MSVC (<= VS 2010) 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 { -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER<=1600 return this->m_count ? this->m_sdata.get() : (E*)(this-1); #else return this->m_sdata.get();