aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/bigint/bigint.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-14 06:18:15 +0000
committerlloyd <[email protected]>2010-02-14 06:18:15 +0000
commit7424a5b5102b569e3c052cb195c98b5d1b60ce30 (patch)
tree70ab6872b9980969a7dea97bccdcdbb4e4916f7a /src/math/bigint/bigint.cpp
parent12e07d37e9622cfb24b2102090550a0260c6665c (diff)
parent16c3b54220d6e80f713a4d6321deb53a7b1e1fec (diff)
propagate from branch 'net.randombit.botan' (head 5bfc3e699003b86615c584f8ae40bd6e761f96c0)
to branch 'net.randombit.botan.c++0x' (head 8c64a107b58d41f376bfffc69dfab4514d722c5c)
Diffstat (limited to 'src/math/bigint/bigint.cpp')
-rw-r--r--src/math/bigint/bigint.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp
index 09ac2a75d..b92cd359e 100644
--- a/src/math/bigint/bigint.cpp
+++ b/src/math/bigint/bigint.cpp
@@ -40,7 +40,7 @@ BigInt::BigInt(Sign s, u32bit size)
}
/*
-* Construct a BigInt from a "raw" BigInt
+* Copy constructor
*/
BigInt::BigInt(const BigInt& b)
{
@@ -100,6 +100,25 @@ BigInt::BigInt(RandomNumberGenerator& rng, u32bit bits)
randomize(rng, bits);
}
+/**
+* Move constructor
+*/
+BigInt::BigInt(BigInt&& other)
+ {
+ std::swap(*this, other);
+ }
+
+/**
+* Move assignment
+*/
+BigInt& BigInt::operator=(BigInt&& other)
+ {
+ if(this != &other)
+ std::swap(*this, other);
+
+ return (*this);
+ }
+
/*
* Swap this BigInt with another
*/