From a90e3efde5f79f17c570e1f111010be2ff445cb6 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 11 Feb 2021 09:43:33 +0000 Subject: [PATCH] For MSVC builds revert some mappings to use the heap based strategy rather than boost::aligned_storage and StackAllocator It was initially thought that the runtime issues had been fixed in VS2015 but in fact it's still very problematic - even in VS2019 :-( --- libs/ardour/ardour/chan_mapping.h | 5 ++++- libs/ardour/ardour/plugin_insert.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 7a4d41123e..21838a1221 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -104,7 +104,10 @@ public: */ bool is_subset (const ChanMapping& superset) const; -#if defined(_MSC_VER) && (_MSC_VER < 1900) +#if defined(_MSC_VER) /* && (_MSC_VER < 1900) + * Regarding the note (below) it was initially + * thought that this got fixed in VS2015 - but + * in fact it's still faulty (JE - Feb 2021) */ /* Use the older (heap based) mapping for early versions of MSVC. * In fact it might be safer to use this for all MSVC builds - as * our StackAllocator class depends on 'boost::aligned_storage' diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index f15967640b..097c8e80ce 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -371,7 +371,10 @@ private: /* ordered map [plugin instance ID] => ARDOUR::ChanMapping * TODO: consider replacing with boost::flat_map<> or std::vector<>. */ -#if defined(_MSC_VER) && (_MSC_VER < 1900) +#if defined(_MSC_VER) /* && (_MSC_VER < 1900) + * Regarding the note (below) it was initially + * thought that this got fixed in VS2015 - but + * in fact it's still faulty (JE - Feb 2021) */ /* Use the older (heap based) mapping for early versions of MSVC. * In fact it might be safer to use this for all MSVC builds - as * our StackAllocator class depends on 'boost::aligned_storage'