Hello community,

here is the log from the commit of package mdds-1_2 for openSUSE:Factory 
checked in at 2016-08-26 23:12:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mdds-1_2 (Old)
 and      /work/SRC/openSUSE:Factory/.mdds-1_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mdds-1_2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mdds-1_2/mdds-1_2.changes        2016-06-14 
23:04:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mdds-1_2.new/mdds-1_2.changes   2016-08-26 
23:12:45.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Aug 19 19:01:17 UTC 2016 - [email protected]
+
+- Version update to 1.2.1:
+  * Few small bugfixes
+
+-------------------------------------------------------------------

Old:
----
  mdds-1.2.0.tar.bz2

New:
----
  mdds-1.2.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mdds-1_2.spec ++++++
--- /var/tmp/diff_new_pack.GXOpGF/_old  2016-08-26 23:12:46.000000000 +0200
+++ /var/tmp/diff_new_pack.GXOpGF/_new  2016-08-26 23:12:46.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package mdds-1_0
+# spec file for package mdds-1_2
 #
 # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
@@ -21,7 +21,7 @@
 %define _apiver 1.2
 %define _oname mdds
 Name:           %{_oname}-1_2
-Version:        1.2.0
+Version:        1.2.1
 Release:        0
 Summary:        A collection of multi-dimensional data structure and indexing 
algorithm
 License:        MIT

++++++ mdds-1.2.0.tar.bz2 -> mdds-1.2.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/CHANGELOG new/mdds-1.2.1/CHANGELOG
--- old/mdds-1.2.0/CHANGELOG    2016-05-03 02:41:57.000000000 +0200
+++ new/mdds-1.2.1/CHANGELOG    2016-06-18 20:50:29.000000000 +0200
@@ -1,3 +1,19 @@
+mdds 1.2.1 (not yet released)
+
+* multi_type_vector
+
+  * added size() method to the element block type, which returns the
+    actual size of the element block, instead of the cached size value
+    stored in the parent structure that stores the element block.
+
+  * fixed a double-deletion bug in the swap() method which would
+    triggered when used with a managed element block.
+
+* mtv::collection
+
+  * fixed collection iterator's get() method to properly return values
+    from the boolean element block.
+
 mdds 1.2.0
 
 * packed_trie_map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/README.md new/mdds-1.2.1/README.md
--- old/mdds-1.2.0/README.md    2016-05-03 02:41:57.000000000 +0200
+++ new/mdds-1.2.1/README.md    2016-05-12 02:46:57.000000000 +0200
@@ -102,6 +102,7 @@
 
 | Version | API Version | Release Date | Download | Check Sum | File Size 
(bytes) |
 
|---------|-------------|--------------|----------|-----------|-------------------|
+| 1.2.0 | 1.2 | 2016-05-11 | 
[mdds-1.2.0.tar.bz2](http://kohei.us/files/mdds/src/mdds-1.2.0.tar.bz2) | 
sha256sum: f44fd0635de94c7d490f9a65f74b5e55860d7bdd507951428294f9690fda45b6 | 
284962 |
 | 1.1.0 | 1.0 | 2016-02-10 | 
[mdds-1.1.0.tar.bz2](http://kohei.us/files/mdds/src/mdds-1.1.0.tar.bz2) | 
sha256sum: 4253ab93fe8bb579321a50e247f1f800191ab99fe2d8c6c181741b8bd3fb161f | 
258691 |
 | 1.0.0 | 1.0 | 2015-10-06 | 
[mdds_1.0.0.tar.bz2](http://kohei.us/files/mdds/src/mdds_1.0.0.tar.bz2) | 
sha256sum: ef8abc1236b54c7ca16ae1ee38abfb9cdbc5d1e6a2427c65b92b8c1003e3bf56 | 
166619 |
 | 0.12.1 || 2015-06-11 | 
[mdds_0.12.1.tar.bz2](http://kohei.us/files/mdds/src/mdds_0.12.1.tar.bz2) | 
md5sum: ef2560ed5416652a7fe195305b14cebe<br/>sha1sum: 
e7469349f8d0c65545896fe553918f3ea93bd84d | - |
@@ -140,8 +141,8 @@
 API Incompatibility Notes
 =========================
 
-1.2 (not yet released)
-----------------------
+1.2
+---
 
 ### trie_map / packed_trie_map
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/configure new/mdds-1.2.1/configure
--- old/mdds-1.2.0/configure    2016-05-12 02:10:36.000000000 +0200
+++ new/mdds-1.2.1/configure    2016-06-08 04:09:51.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mdds 1.2.0.
+# Generated by GNU Autoconf 2.69 for mdds 1.2.1.
 #
 # Report bugs to <[email protected]>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='mdds'
 PACKAGE_TARNAME='mdds'
-PACKAGE_VERSION='1.2.0'
-PACKAGE_STRING='mdds 1.2.0'
+PACKAGE_VERSION='1.2.1'
+PACKAGE_STRING='mdds 1.2.1'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1246,7 +1246,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mdds 1.2.0 to adapt to many kinds of systems.
+\`configure' configures mdds 1.2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1312,7 +1312,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mdds 1.2.0:";;
+     short | recursive ) echo "Configuration of mdds 1.2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1411,7 +1411,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mdds configure 1.2.0
+mdds configure 1.2.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1466,7 +1466,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mdds $as_me 1.2.0, which was
+It was created by mdds $as_me 1.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2329,7 +2329,7 @@
 
 # Define the identity of the package.
  PACKAGE='mdds'
- VERSION='1.2.0'
+ VERSION='1.2.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2445,7 +2445,7 @@
 
 
 
-VERSION=1.2.0
+VERSION=1.2.1
 API_VERSION=1.2
 
 
@@ -3931,7 +3931,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mdds $as_me 1.2.0, which was
+This file was extended by mdds $as_me 1.2.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3988,7 +3988,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mdds config.status 1.2.0
+mdds config.status 1.2.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/configure.ac new/mdds-1.2.1/configure.ac
--- old/mdds-1.2.0/configure.ac 2016-04-23 16:25:59.000000000 +0200
+++ new/mdds-1.2.1/configure.ac 2016-06-08 04:08:46.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT(mdds, 1.2.0, [email protected])
+AC_INIT(mdds, 1.2.1, [email protected])
 AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
 AM_MAINTAINER_MODE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mdds-1.2.0/include/mdds/multi_type_vector/collection.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector/collection.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector/collection.hpp        
2016-04-03 05:02:47.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector/collection.hpp        
2016-06-08 04:04:47.000000000 +0200
@@ -79,7 +79,7 @@
         template<typename _Blk>
         typename _Blk::value_type get() const
         {
-            return _Blk::at(*__position.first->data, __position.second);
+            return _Blk::get_value(*__position.first->data, __position.second);
         }
 
     private:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func1.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func1.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func1.hpp      
2015-07-02 22:12:15.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func1.hpp      
2016-06-18 05:24:32.000000000 +0200
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * Copyright (c) 2013 Kohei Yoshida
+ * Copyright (c) 2013-2016 Kohei Yoshida
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -25,8 +25,8 @@
  *
  ************************************************************************/
 
-#ifndef MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC1_HPP
-#define MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC1_HPP
+#ifndef INCLUDED_MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC1_HPP
+#define INCLUDED_MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC1_HPP
 
 #include "multi_type_vector_types.hpp"
 #include "multi_type_vector_trait.hpp"
@@ -231,6 +231,17 @@
                 element_block_func::shrink_to_fit(block);
         }
     }
+
+    static size_t size(const base_element_block& block)
+    {
+        switch (get_block_type(block))
+        {
+            case _Block::block_type:
+                return _Block::size(block);
+            default:
+                return element_block_func::size(block);
+        }
+    }
 };
 
 }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func2.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func2.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func2.hpp      
2015-07-02 22:12:15.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func2.hpp      
2016-06-18 05:24:32.000000000 +0200
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * Copyright (c) 2013 Kohei Yoshida
+ * Copyright (c) 2013-2016 Kohei Yoshida
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -25,8 +25,8 @@
  *
  ************************************************************************/
 
-#ifndef MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC2_HPP
-#define MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC2_HPP
+#ifndef INCLUDED_MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC2_HPP
+#define INCLUDED_MDDS_MULTI_TYPE_VECTOR_CUSTOM_FUNC2_HPP
 
 #include "multi_type_vector_types.hpp"
 #include "multi_type_vector_trait.hpp"
@@ -281,6 +281,19 @@
                 element_block_func::shrink_to_fit(block);
         }
     }
+
+    static size_t size(const base_element_block& block)
+    {
+        switch (get_block_type(block))
+        {
+            case _Block1::block_type:
+                return _Block1::size(block);
+            case _Block2::block_type:
+                return _Block2::size(block);
+            default:
+                return element_block_func::size(block);
+        }
+    }
 };
 
 }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func3.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func3.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector_custom_func3.hpp      
2015-07-02 22:12:15.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_custom_func3.hpp      
2016-06-18 05:24:32.000000000 +0200
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * Copyright (c) 2013 Kohei Yoshida
+ * Copyright (c) 2013-2016 Kohei Yoshida
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -25,8 +25,8 @@
  *
  ************************************************************************/
 
-#ifndef MULTI_TYPE_VECTOR_CUSTOM_FUNC3_HPP
-#define MULTI_TYPE_VECTOR_CUSTOM_FUNC3_HPP
+#ifndef INCLUDED_MULTI_TYPE_VECTOR_CUSTOM_FUNC3_HPP
+#define INCLUDED_MULTI_TYPE_VECTOR_CUSTOM_FUNC3_HPP
 
 #include "multi_type_vector_types.hpp"
 #include "multi_type_vector_trait.hpp"
@@ -328,6 +328,21 @@
                 element_block_func::shrink_to_fit(block);
         }
     }
+
+    static size_t size(const base_element_block& block)
+    {
+        switch (get_block_type(block))
+        {
+            case _Block1::block_type:
+                return _Block1::size(block);
+            case _Block2::block_type:
+                return _Block2::size(block);
+            case _Block3::block_type:
+                return _Block3::size(block);
+            default:
+                return element_block_func::size(block);
+        }
+    }
 };
 
 }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/include/mdds/multi_type_vector_def.inl 
new/mdds-1.2.1/include/mdds/multi_type_vector_def.inl
--- old/mdds-1.2.0/include/mdds/multi_type_vector_def.inl       2016-04-20 
04:25:11.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_def.inl       2016-06-18 
05:30:40.000000000 +0200
@@ -2308,7 +2308,10 @@
 
         if (src_tail_len == 0)
         {
-            // the whole block needs to be replaced.
+            // the whole block needs to be replaced.  Delete the block, but
+            // don't delete the managed elements the block contains since they
+            // have been transferred over to the destination block.
+            element_block_func::resize_block(*blk_src->mp_data, 0);
             delete_block(blk_src);
             m_blocks.erase(m_blocks.begin()+block_index);
         }
@@ -4435,8 +4438,16 @@
 
         element_category_type cat = mtv::element_type_empty;
         if (blk->mp_data)
+        {
             cat = mtv::get_block_type(*blk->mp_data);
 
+            if (element_block_func::size(*blk->mp_data) != blk->m_size)
+            {
+                cerr << "block size cache and the actual element block size 
differ!" << endl;
+                return false;
+            }
+        }
+
         if (cat_prev == cat)
         {
             cerr << "Two adjacent blocks should never be of the same type." << 
endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/include/mdds/multi_type_vector_trait.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector_trait.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector_trait.hpp     2015-07-02 
22:12:15.000000000 +0200
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_trait.hpp     2016-06-18 
05:24:32.000000000 +0200
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * Copyright (c) 2012 Kohei Yoshida
+ * Copyright (c) 2012-2016 Kohei Yoshida
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -25,8 +25,8 @@
  *
  ************************************************************************/
 
-#ifndef __MDDS_MULTI_TYPE_VECTOR_TRAIT_HPP__
-#define __MDDS_MULTI_TYPE_VECTOR_TRAIT_HPP__
+#ifndef INCLUDED_MDDS_MULTI_TYPE_VECTOR_TRAIT_HPP
+#define INCLUDED_MDDS_MULTI_TYPE_VECTOR_TRAIT_HPP
 
 #include "multi_type_vector_types.hpp"
 
@@ -76,6 +76,8 @@
     inline static void overwrite_values(base_element_block& block, size_t pos, 
size_t len);
 
     inline static void shrink_to_fit(base_element_block& block);
+
+    inline static size_t size(const base_element_block& block);
 };
 
 base_element_block* element_block_func_base::create_new_block(element_t type, 
size_t init_size)
@@ -652,6 +654,37 @@
     }
 }
 
+size_t element_block_func_base::size(const base_element_block& block)
+{
+    switch (get_block_type(block))
+    {
+        case element_type_numeric:
+            return numeric_element_block::size(block);
+        case element_type_string:
+            return string_element_block::size(block);
+        case element_type_short:
+            return short_element_block::size(block);
+        case element_type_ushort:
+            return ushort_element_block::size(block);
+        case element_type_int:
+            return int_element_block::size(block);
+        case element_type_uint:
+            return uint_element_block::size(block);
+        case element_type_long:
+            return long_element_block::size(block);
+        case element_type_ulong:
+            return ulong_element_block::size(block);
+        case element_type_boolean:
+            return boolean_element_block::size(block);
+        case element_type_char:
+            return char_element_block::size(block);
+        case element_type_uchar:
+            return uchar_element_block::size(block);
+        default:
+            throw general_error("size: failed to print a block of unknown 
type.");
+    }
+}
+
 /**
  * Default cell block function definitions.  Implementation can use this if
  * it only uses the default block types implemented by the library.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/include/mdds/multi_type_vector_types.hpp 
new/mdds-1.2.1/include/mdds/multi_type_vector_types.hpp
--- old/mdds-1.2.0/include/mdds/multi_type_vector_types.hpp     2016-01-27 
00:04:24.000000000 +0100
+++ new/mdds-1.2.1/include/mdds/multi_type_vector_types.hpp     2016-06-18 
05:24:32.000000000 +0200
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * Copyright (c) 2012-2014 Kohei Yoshida
+ * Copyright (c) 2012-2016 Kohei Yoshida
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -151,6 +151,11 @@
         return get(block).m_array.at(pos);
     }
 
+    static typename store_type::size_type size(const base_element_block& block)
+    {
+        return get(block).m_array.size();
+    }
+
     static iterator begin(base_element_block& block)
     {
         return get(block).m_array.begin();
@@ -227,6 +232,11 @@
         val = get(blk).m_array[pos];
     }
 
+    static value_type get_value(const base_element_block& blk, size_t pos)
+    {
+        return get(blk).m_array[pos];
+    }
+
     static void append_value(base_element_block& blk, const _Data& val)
     {
         get(blk).m_array.push_back(val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/src/multi_type_vector_test_collection.cpp 
new/mdds-1.2.1/src/multi_type_vector_test_collection.cpp
--- old/mdds-1.2.0/src/multi_type_vector_test_collection.cpp    2016-04-03 
05:03:28.000000000 +0200
+++ new/mdds-1.2.1/src/multi_type_vector_test_collection.cpp    2016-06-08 
04:07:50.000000000 +0200
@@ -375,6 +375,32 @@
     catch (const invalid_arg_error&) {}
 }
 
+void mtv_test_boolean_block()
+{
+    stack_printer __stack_printer__("::mtv_test_boolean_block");
+
+    vector<mtv_type> vectors;
+    vectors.reserve(2);
+    vectors.emplace_back(1, true);
+    vectors.emplace_back(1, false);
+
+    cols_type collection(vectors.begin(), vectors.end());
+
+    auto it = collection.begin();
+    assert(it->type == mtv::element_type_boolean);
+    assert(it->index == 0);
+    assert(it->position == 0);
+    assert(it->get<mtv::boolean_element_block>() == true);
+
+    ++it;
+    assert(it->type == mtv::element_type_boolean);
+    assert(it->index == 1);
+    assert(it->position == 0);
+    assert(it->get<mtv::boolean_element_block>() == false);
+
+    assert(++it == collection.end());
+}
+
 int main (int argc, char **argv)
 {
     try
@@ -388,6 +414,7 @@
         mtv_test_sub_element_ranges();
         mtv_test_sub_element_ranges_invalid();
         mtv_test_sub_collection_ranges_invalid();
+        mtv_test_boolean_block();
     }
     catch (const std::exception& e)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdds-1.2.0/src/multi_type_vector_test_custom.cpp 
new/mdds-1.2.1/src/multi_type_vector_test_custom.cpp
--- old/mdds-1.2.0/src/multi_type_vector_test_custom.cpp        2015-07-08 
02:57:25.000000000 +0200
+++ new/mdds-1.2.1/src/multi_type_vector_test_custom.cpp        2016-06-18 
20:37:34.000000000 +0200
@@ -1549,6 +1549,35 @@
     assert(db2.check_block_integrity());
 }
 
+void mtv_test_swap_2()
+{
+    stack_printer __stack_printer__("::mtv_test_swap_2");
+    mtv3_type db1(3), db2(3);
+
+    db1.set(0, new muser_cell(1.1));
+    db1.set(1, new muser_cell(1.2));
+
+    db2.set(0, 1.2);
+    db2.set(1, std::string("foo"));
+
+    // Repeat the same swap twice.
+    db1.swap(0, 1, db2, 0);
+    assert(db1.check_block_integrity());
+    assert(db2.check_block_integrity());
+    assert(db2.get<muser_cell*>(0)->value == 1.1);
+    assert(db2.get<muser_cell*>(1)->value == 1.2);
+    assert(db1.get<double>(0) == 1.2);
+    assert(db1.get<std::string>(1) == "foo");
+
+    db1.swap(0, 1, db2, 0);
+    assert(db1.check_block_integrity());
+    assert(db2.check_block_integrity());
+    assert(db1.get<muser_cell*>(0)->value == 1.1);
+    assert(db1.get<muser_cell*>(1)->value == 1.2);
+    assert(db2.get<double>(0) == 1.2);
+    assert(db2.get<std::string>(1) == "foo");
+}
+
 void mtv_test_custom_block_func3()
 {
     stack_printer __stack_printer__("::mtv_test_custom_block_func3");
@@ -1677,6 +1706,7 @@
         mtv_test_custom_block_func1();
         mtv_test_transfer();
         mtv_test_swap();
+        mtv_test_swap_2();
         mtv_test_custom_block_func3();
         mtv_test_release();
         mtv_test_construction_with_array();


Reply via email to