Fix a build error when building with C++11 & -Werror=terminate. Destructors are noexcept by default in C++11, which gets flagged it one spot in cryptlib code. Using noexcept(false) ought to be ok here; the exception would only happen if you had a corrupted keyfile, which is unrecoverable anyway.
This commit is contained in:
parent
aaa132d211
commit
3d304eb1af
|
@ -81,7 +81,7 @@ BERSequenceDecoder::BERSequenceDecoder(BufferedTransformation &inQueue)
|
|||
definiteLength = BERLengthDecode(inQueue, length);
|
||||
}
|
||||
|
||||
BERSequenceDecoder::~BERSequenceDecoder()
|
||||
BERSequenceDecoder::~BERSequenceDecoder() NOEXCEPT_FALSE
|
||||
{
|
||||
if (!definiteLength)
|
||||
{ // remove end-of-content octects
|
||||
|
|
|
@ -25,7 +25,7 @@ class BERSequenceDecoder : public BufferedTransformation
|
|||
{
|
||||
public:
|
||||
BERSequenceDecoder(BufferedTransformation &inQueue);
|
||||
~BERSequenceDecoder();
|
||||
~BERSequenceDecoder() NOEXCEPT_FALSE;
|
||||
|
||||
void Put(byte) {}
|
||||
void Put(const byte *, unsigned int) {}
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define NOEXCEPT_FALSE noexcept(false)
|
||||
#else
|
||||
# define NOEXCEPT_FALSE
|
||||
#endif
|
||||
|
||||
/// base class for all exceptions thrown by Crypto++
|
||||
class CryptlibException : public std::exception
|
||||
{
|
||||
|
@ -198,7 +204,7 @@ class BufferedTransformation
|
|||
{
|
||||
public:
|
||||
///
|
||||
virtual ~BufferedTransformation() {}
|
||||
virtual ~BufferedTransformation() NOEXCEPT_FALSE {}
|
||||
|
||||
//@Man: INPUT
|
||||
//@{
|
||||
|
|
Loading…
Reference in New Issue