Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53246 - in trunk: boost/multi_index/detail libs/multi_index/test
From: joaquin_at_[hidden]
Date: 2009-05-25 08:20:09


Author: joaquin
Date: 2009-05-25 08:20:07 EDT (Mon, 25 May 2009)
New Revision: 53246
URL: http://svn.boost.org/trac/boost/changeset/53246

Log:
fixed #3076
Text files modified:
   trunk/boost/multi_index/detail/rnd_index_ops.hpp | 4 +++-
   trunk/libs/multi_index/test/test_list_ops.cpp | 11 ++++++++++-
   2 files changed, 13 insertions(+), 2 deletions(-)

Modified: trunk/boost/multi_index/detail/rnd_index_ops.hpp
==============================================================================
--- trunk/boost/multi_index/detail/rnd_index_ops.hpp (original)
+++ trunk/boost/multi_index/detail/rnd_index_ops.hpp 2009-05-25 08:20:07 EDT (Mon, 25 May 2009)
@@ -1,4 +1,4 @@
-/* Copyright 2003-2008 Joaquin M Lopez Munoz.
+/* Copyright 2003-2009 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -174,6 +174,8 @@
    * solution adopted.
    */
 
+ if(ptrs.size()<=1)return;
+
   typedef typename Node::value_type value_type;
   typedef typename Node::impl_pointer impl_pointer;
   typedef typename Node::impl_ptr_pointer impl_ptr_pointer;

Modified: trunk/libs/multi_index/test/test_list_ops.cpp
==============================================================================
--- trunk/libs/multi_index/test/test_list_ops.cpp (original)
+++ trunk/libs/multi_index/test/test_list_ops.cpp 2009-05-25 08:20:07 EDT (Mon, 25 May 2009)
@@ -1,6 +1,6 @@
 /* Boost.MultiIndex test for standard list operations.
  *
- * Copyright 2003-2008 Joaquin M Lopez Munoz.
+ * Copyright 2003-2009 Joaquin M Lopez Munoz.
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
@@ -148,6 +148,15 @@
   si.merge(si2,std::greater<int>());
   BOOST_CHECK(is_sorted(si,std::greater<int>()));
   BOOST_CHECK(si2.empty());
+
+ /* testcase for bug reported at
+ * https://svn.boost.org/trac/boost/ticket/3076
+ */
+ {
+ Sequence ss3;
+ sequenced_index &si3=get<1>(ss3);
+ si3.sort();
+ }
 }
 
 template<typename Sequence>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk