[Groonga-commit] groonga/grnxx at d9f84e4 [master] Update Array to support move.

Back to archive index

susumu.yata null+****@clear*****
Fri Jul 25 17:54:15 JST 2014


susumu.yata	2014-07-25 17:54:15 +0900 (Fri, 25 Jul 2014)

  New Revision: d9f84e4f61a11b30d866dde7f40fe9d2439d198f
  https://github.com/groonga/grnxx/commit/d9f84e4f61a11b30d866dde7f40fe9d2439d198f

  Message:
    Update Array to support move.

  Modified files:
    include/grnxx/array.hpp

  Modified: include/grnxx/array.hpp (+7 -0)
===================================================================
--- include/grnxx/array.hpp    2014-07-25 17:47:09 +0900 (7d72f75)
+++ include/grnxx/array.hpp    2014-07-25 17:54:15 +0900 (25197b6)
@@ -19,6 +19,13 @@ class Array {
   Array() : values_() {}
   ~Array() {}
 
+  Array(Array &&array) : values_(std::move(array.values_)) {}
+
+  Array &operator=(Array &&array) {
+    values_ = std::move(array.values_);
+    return *this;
+  }
+
   T &operator[](Int i) {
     return values_[static_cast<size_t>(i)];
   }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index