From 8a6d18853d5a8c7e97f59edc4907015648401ad9 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 2 Oct 2016 02:52:10 -0400 Subject: [PATCH] Guard DEBUG_NEW for Visual Studio and leak detection --- algparam.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/algparam.h b/algparam.h index 92eb384d..f5a79c5e 100644 --- a/algparam.h +++ b/algparam.h @@ -459,12 +459,21 @@ public: } } +#if defined(_MSC_VER) && (_MSC_VER >= 1300) +# pragma push_macro("new") +# undef new +#endif + void MoveInto(void *buffer) const { AlgorithmParametersTemplate* p = new(buffer) AlgorithmParametersTemplate(*this); CRYPTOPP_UNUSED(p); // silence warning } +#if defined(_MSC_VER) && (_MSC_VER >= 1300) +# pragma pop_macro("new") +#endif + protected: T m_value; };