aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/log.txt2
-rw-r--r--src/alloc/secmem.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/doc/log.txt b/doc/log.txt
index b9c6c9230..121d284d6 100644
--- a/doc/log.txt
+++ b/doc/log.txt
@@ -10,6 +10,8 @@ Series 1.10
Version 1.10.0, Not Yet Released
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+* A template specialization of std::swap was added for the memory
+ container types.
Series 1.9
----------------------------------------
diff --git a/src/alloc/secmem.h b/src/alloc/secmem.h
index 80e8e59aa..d07aa949f 100644
--- a/src/alloc/secmem.h
+++ b/src/alloc/secmem.h
@@ -418,4 +418,14 @@ void zeroise(MemoryRegion<T>& vec)
}
+namespace std {
+
+template<typename T>
+inline void swap(Botan::MemoryRegion<T>& x, Botan::MemoryRegion<T>& y)
+ {
+ x.swap(y);
+ }
+
+}
+
#endif