]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/move/test/adaptive_sort_test.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / move / test / adaptive_sort_test.cpp
index 686b4bdd2f1e13e9ca1387172c50f7871004a90f..973dd4c36e3216d56d0229acf72b5731d2f99abd 100644 (file)
@@ -38,7 +38,7 @@ bool test_random_shuffled(std::size_t const element_count, std::size_t const num
 
    std::srand(0);
 
-   for (std::size_t i = 0; i != num_iter; ++i)
+   for (std::size_t it = 0; it != num_iter; ++it)
    {
       ::random_shuffle(elements.get(), elements.get() + element_count);
       for(std::size_t i = 0; i < (num_keys ? num_keys : element_count); ++i){
@@ -59,8 +59,19 @@ bool test_random_shuffled(std::size_t const element_count, std::size_t const num
    return true;
 }
 
+void instantiate_smalldiff_iterators()
+{
+   typedef randit<int, short> short_rand_it_t;
+   boost::movelib::adaptive_sort(short_rand_it_t(), short_rand_it_t(), less_int());
+
+   typedef randit<int, signed char> schar_rand_it_t;
+   boost::movelib::adaptive_sort(schar_rand_it_t(), schar_rand_it_t(), less_int());
+}
+
 int main()
 {
+   instantiate_smalldiff_iterators();
+
    const std::size_t NIter = 100;
    test_random_shuffled<order_move_type>(10001, 3,   NIter);
    test_random_shuffled<order_move_type>(10001, 65,   NIter);