File build_with_gcc_4_3.patch of Package Botan.5777
Index: Botan-1.10.9/src/utils/safeint.h
===================================================================
--- Botan-1.10.9.orig/src/utils/safeint.h
+++ Botan-1.10.9/src/utils/safeint.h
@@ -10,14 +10,22 @@
#include <botan/exceptn.h>
#include <string>
+#include <sstream>
namespace Botan {
class Integer_Overflow_Detected : public Exception
{
+ private:
+ template < typename T > std::string int_to_string(const T& n)
+ {
+ std::ostringstream stream;
+ stream << n;
+ return stream.str();
+ }
public:
Integer_Overflow_Detected(const std::string& file, int line) :
- Exception("Integer overflow detected at " + file + ":" + std::to_string(line))
+ Exception("Integer overflow detected at " + file + ":" + int_to_string(line))
{}
};