diff DEPENDENCIES/generic/include/boost/multi_index/sequenced_index.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/multi_index/sequenced_index.hpp	Fri Sep 04 12:01:02 2015 +0100
+++ b/DEPENDENCIES/generic/include/boost/multi_index/sequenced_index.hpp	Mon Sep 07 11:12:49 2015 +0100
@@ -1,4 +1,4 @@
-/* Copyright 2003-2013 Joaquin M Lopez Munoz.
+/* Copyright 2003-2014 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)
@@ -9,7 +9,7 @@
 #ifndef BOOST_MULTI_INDEX_SEQUENCED_INDEX_HPP
 #define BOOST_MULTI_INDEX_SEQUENCED_INDEX_HPP
 
-#if defined(_MSC_VER)&&(_MSC_VER>=1200)
+#if defined(_MSC_VER)
 #pragma once
 #endif
 
@@ -29,7 +29,6 @@
 #include <boost/multi_index/detail/bidir_node_iterator.hpp>
 #include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
 #include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/safe_ctr_proxy.hpp>
 #include <boost/multi_index/detail/safe_mode.hpp>
 #include <boost/multi_index/detail/scope_guard.hpp>
 #include <boost/multi_index/detail/seq_index_node.hpp>
@@ -75,16 +74,9 @@
   BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
 
 #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
-#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
-  ,public safe_ctr_proxy_impl<
-    bidir_node_iterator<
-      sequenced_index_node<typename SuperMeta::type::node_type> >,
-    sequenced_index<SuperMeta,TagList> >
-#else
   ,public safe_mode::safe_container<
     sequenced_index<SuperMeta,TagList> >
 #endif
-#endif
 
 { 
 #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
@@ -116,16 +108,9 @@
   typedef typename allocator_type::const_reference    const_reference;
 
 #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
-#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
-  typedef safe_mode::safe_iterator<
-    bidir_node_iterator<node_type>,
-    safe_ctr_proxy<
-      bidir_node_iterator<node_type> > >              iterator;
-#else
   typedef safe_mode::safe_iterator<
     bidir_node_iterator<node_type>,
     sequenced_index>                                  iterator;
-#endif
 #else
   typedef bidir_node_iterator<node_type>              iterator;
 #endif
@@ -165,15 +150,9 @@
 
 private:
 #if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
-#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
-  typedef safe_ctr_proxy_impl<
-    bidir_node_iterator<node_type>,
-    sequenced_index>                          safe_super;
-#else
   typedef safe_mode::safe_container<
     sequenced_index>                          safe_super;
 #endif
-#endif
 
   typedef typename call_traits<value_type>::param_type value_param_type;
 
@@ -226,27 +205,37 @@
     for(size_type i=0;i<n;++i)push_back(value);
   }
     
-  allocator_type get_allocator()const
+  allocator_type get_allocator()const BOOST_NOEXCEPT
   {
     return this->final().get_allocator();
   }
 
   /* iterators */
 
-  iterator               begin()
+  iterator  begin()BOOST_NOEXCEPT
     {return make_iterator(node_type::from_impl(header()->next()));}
-  const_iterator         begin()const
+  const_iterator begin()const BOOST_NOEXCEPT
     {return make_iterator(node_type::from_impl(header()->next()));}
-  iterator               end(){return make_iterator(header());}
-  const_iterator         end()const{return make_iterator(header());}
-  reverse_iterator       rbegin(){return make_reverse_iterator(end());}
-  const_reverse_iterator rbegin()const{return make_reverse_iterator(end());}
-  reverse_iterator       rend(){return make_reverse_iterator(begin());}
-  const_reverse_iterator rend()const{return make_reverse_iterator(begin());}
-  const_iterator         cbegin()const{return begin();}
-  const_iterator         cend()const{return end();}
-  const_reverse_iterator crbegin()const{return rbegin();}
-  const_reverse_iterator crend()const{return rend();}
+  iterator
+    end()BOOST_NOEXCEPT{return make_iterator(header());}
+  const_iterator
+    end()const BOOST_NOEXCEPT{return make_iterator(header());}
+  reverse_iterator
+    rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+  const_reverse_iterator
+    rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
+  reverse_iterator
+    rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+  const_reverse_iterator
+    rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
+  const_iterator
+    cbegin()const BOOST_NOEXCEPT{return begin();}
+  const_iterator
+    cend()const BOOST_NOEXCEPT{return end();}
+  const_reverse_iterator
+    crbegin()const BOOST_NOEXCEPT{return rbegin();}
+  const_reverse_iterator
+    crend()const BOOST_NOEXCEPT{return rend();}
 
   iterator iterator_to(const value_type& x)
   {
@@ -260,9 +249,9 @@
 
   /* capacity */
 
-  bool      empty()const{return this->final_empty_();}
-  size_type size()const{return this->final_size_();}
-  size_type max_size()const{return this->final_max_size_();}
+  bool      empty()const BOOST_NOEXCEPT{return this->final_empty_();}
+  size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
+  size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
 
   void resize(size_type n)
   {
@@ -422,7 +411,7 @@
   }
 
   template<typename Modifier,typename Rollback>
-  bool modify(iterator position,Modifier mod,Rollback back)
+  bool modify(iterator position,Modifier mod,Rollback back_)
   {
     BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
     BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
@@ -439,7 +428,7 @@
 #endif
 
     return this->final_modify_(
-      mod,back,static_cast<final_node_type*>(position.get_node()));
+      mod,back_,static_cast<final_node_type*>(position.get_node()));
   }
 
   void swap(sequenced_index<SuperMeta,TagList>& x)
@@ -449,7 +438,7 @@
     this->final_swap_(x.final());
   }
 
-  void clear()
+  void clear()BOOST_NOEXCEPT
   {
     BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
     this->final_clear_();
@@ -571,7 +560,7 @@
     sequenced_index_sort(header(),comp);
   }
 
-  void reverse()
+  void reverse()BOOST_NOEXCEPT
   {
     BOOST_MULTI_INDEX_SEQ_INDEX_CHECK_INVARIANT;
     node_impl_type::reverse(header()->impl());
@@ -679,20 +668,20 @@
   }
 
   template<typename Variant>
-  node_type* insert_(value_param_type v,node_type* x,Variant variant)
+  final_node_type* insert_(
+    value_param_type v,final_node_type*& x,Variant variant)
   {
-    node_type* res=static_cast<node_type*>(super::insert_(v,x,variant));
-    if(res==x)link(x);
+    final_node_type* res=super::insert_(v,x,variant);
+    if(res==x)link(static_cast<node_type*>(x));
     return res;
   }
 
   template<typename Variant>
-  node_type* insert_(
-    value_param_type v,node_type* position,node_type* x,Variant variant)
+  final_node_type* insert_(
+    value_param_type v,node_type* position,final_node_type*& x,Variant variant)
   {
-    node_type* res=
-      static_cast<node_type*>(super::insert_(v,position,x,variant));
-    if(res==x)link(x);
+    final_node_type* res=super::insert_(v,position,x,variant);
+    if(res==x)link(static_cast<node_type*>(x));
     return res;
   }
 
@@ -796,7 +785,8 @@
     Archive& ar,const unsigned int version,const index_loader_type& lm)
   {
     lm.load(
-      ::boost::bind(&sequenced_index::rearranger,this,_1,_2),
+      ::boost::bind(
+        &sequenced_index::rearranger,this,::boost::arg<1>(),::boost::arg<2>()),
       ar,version);
     super::load_(ar,version,lm);
   }