pkgsrc-ng/databases/mongodb/patches/patch-src_mongo_shell_linenoise__utf8.h
2016-11-18 22:39:22 +01:00

27 lines
799 B
C++

$NetBSD: patch-src_mongo_shell_linenoise__utf8.h,v 1.3 2016/02/12 03:37:24 ryoon Exp $
Use Boost swap instead of std. Fixes build on SunOS.
--- src/mongo/shell/linenoise_utf8.h.orig 2016-01-05 18:31:44.000000000 +0000
+++ src/mongo/shell/linenoise_utf8.h
@@ -27,6 +27,7 @@
* then also delete it in the license file.
*/
+#include <boost/core/swap.hpp>
#include <algorithm>
#include <memory>
#include <string.h>
@@ -178,9 +179,9 @@ struct UtfStringMixin {
}
void swap(UtfStringMixin& other) {
- std::swap(_len, other._len);
- std::swap(_cap, other._cap);
- std::swap(_chars, other._chars);
+ boost::swap(_len, other._len);
+ boost::swap(_cap, other._cap);
+ boost::swap(_chars, other._chars);
_str.swap(other._str);
}