diff options
author | lloyd <[email protected]> | 2010-09-02 04:01:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-02 04:01:32 +0000 |
commit | daad01ef80771fb709e7cb6f2f7d5f6fcd6fd52f (patch) | |
tree | 426221bf85adff6838d032ef311db431c60d3048 /src/math | |
parent | d9d0f3bd94fd4fe3489c690c74d55169591d33db (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')
-rw-r--r-- | src/math/bigint/bigint.h | 6 |
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); + } } |