aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/bigint
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-02 04:01:32 +0000
committerlloyd <[email protected]>2010-09-02 04:01:32 +0000
commitdaad01ef80771fb709e7cb6f2f7d5f6fcd6fd52f (patch)
tree426221bf85adff6838d032ef311db431c60d3048 /src/math/bigint
parentd9d0f3bd94fd4fe3489c690c74d55169591d33db (diff)
Interesting factoid, turns out that overloading std::swap is not
allowed by the standard, however specializing it is. Fix this for BigInt; it appears the Flexsecure guys knew this since the CurveGFp and PointGFp classes already uses the template specialization rather than an overload.
Diffstat (limited to 'src/math/bigint')
-rw-r--r--src/math/bigint/bigint.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h
index a3a079dcc..64bf20068 100644
--- a/src/math/bigint/bigint.h
+++ b/src/math/bigint/bigint.h
@@ -536,7 +536,11 @@ BOTAN_DLL std::istream& operator>>(std::istream&, BigInt&);
namespace std {
-inline void swap(Botan::BigInt& a, Botan::BigInt& b) { a.swap(b); }
+template<>
+inline void swap(Botan::BigInt& x, Botan::BigInt& y)
+ {
+ x.swap(y);
+ }
}