Guard DEBUG_NEW for Visual Studio and leak detection

pull/326/head
Jeffrey Walton 2016-10-02 02:52:10 -04:00
parent bcb7dffd5e
commit 8a6d18853d
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 9 additions and 0 deletions

View File

@ -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<T>* p = new(buffer) AlgorithmParametersTemplate<T>(*this);
CRYPTOPP_UNUSED(p); // silence warning
}
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
# pragma pop_macro("new")
#endif
protected:
T m_value;
};