]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/intrusive/slist.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / intrusive / slist.hpp
index 444f8e93c74536349803d78e7ebfc9470969f839..8ef2e237df93ad49ea3107c3d46453739b39e313 100644 (file)
 #include <boost/intrusive/detail/simple_disposers.hpp>
 #include <boost/intrusive/detail/size_holder.hpp>
 #include <boost/intrusive/detail/algorithm.hpp>
+#include <boost/intrusive/detail/value_functors.hpp>
 
 #include <boost/move/utility_core.hpp>
 #include <boost/static_assert.hpp>
 
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//std::less
 #include <cstddef>   //std::size_t
-#include <boost/intrusive/detail/minimal_pair_header.hpp>   //std::pair
 
 #if defined(BOOST_HAS_PRAGMA_ONCE)
 #  pragma once
@@ -192,7 +191,7 @@ class slist_impl
    const_node_ptr get_last_node() const
    {  return this->get_last_node(detail::bool_<cache_last>());  }
 
-   void set_last_node(const node_ptr &n)
+   void set_last_node(node_ptr n)
    {  return this->set_last_node(n, detail::bool_<cache_last>());  }
 
    static node_ptr get_last_node(detail::bool_<false>)
@@ -202,7 +201,7 @@ class slist_impl
       return node_ptr();
    }
 
-   static void set_last_node(const node_ptr &, detail::bool_<false>)
+   static void set_last_node(node_ptr , detail::bool_<false>)
    {
       //This function shall not be used if cache_last is not true
       BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
@@ -214,14 +213,14 @@ class slist_impl
    const_node_ptr get_last_node(detail::bool_<true>) const
    {  return const_node_ptr(data_.root_plus_size_.last_);  }
 
-   void set_last_node(const node_ptr & n, detail::bool_<true>)
+   void set_last_node(node_ptr n, detail::bool_<true>)
    {  data_.root_plus_size_.last_ = n;  }
 
    void set_default_constructed_state()
    {
       node_algorithms::init_header(this->get_root_node());
       this->priv_size_traits().set_size(size_type(0));
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          this->set_last_node(this->get_root_node());
       }
    }
@@ -282,13 +281,13 @@ class slist_impl
    //!   list. Iterators of this list and all the references are not invalidated.
    //!
    //! <b>Warning</b>: Experimental function, don't use it!
-   slist_impl( const node_ptr & f, const node_ptr & before_l
+   slist_impl( node_ptr f, node_ptr before_l
              , size_type n, const value_traits &v_traits = value_traits())
       :  data_(v_traits)
    {
       if(n){
          this->priv_size_traits().set_size(n);
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             this->set_last_node(before_l);
          }
          node_traits::set_next(this->get_root_node(), f);
@@ -371,7 +370,7 @@ class slist_impl
    //!   it's a safe-mode or auto-unlink value. Otherwise constant.
    ~slist_impl()
    {
-      if(is_safe_autounlink<ValueTraits::link_mode>::value){
+      BOOST_IF_CONSTEXPR(is_safe_autounlink<ValueTraits::link_mode>::value){
          this->clear();
          node_algorithms::init(this->get_root_node());
       }
@@ -385,9 +384,9 @@ class slist_impl
    //!   if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased elements.
-   void clear()
+   void clear() BOOST_NOEXCEPT
    {
-      if(safemode_or_autounlink){
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink){
          this->clear_and_dispose(detail::null_disposer());
       }
       else{
@@ -406,13 +405,13 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators to the erased elements.
    template <class Disposer>
-   void clear_and_dispose(Disposer disposer)
+   void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT
    {
       const_iterator it(this->begin()), itend(this->end());
       while(it != itend){
          node_ptr to_erase(it.pointed_node());
          ++it;
-         if(safemode_or_autounlink)
+         BOOST_IF_CONSTEXPR(safemode_or_autounlink)
             node_algorithms::init(to_erase);
          disposer(priv_value_traits().to_value_ptr(to_erase));
       }
@@ -429,11 +428,11 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   void push_front(reference value)
+   void push_front(reference value) BOOST_NOEXCEPT
    {
       node_ptr to_insert = priv_value_traits().to_node_ptr(value);
       BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          if(this->empty()){
             this->set_last_node(to_insert);
          }
@@ -453,13 +452,13 @@ class slist_impl
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    //!   This function is only available is cache_last<> is true.
-   void push_back(reference value)
+   void push_back(reference value) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT((cache_last));
       node_ptr n = priv_value_traits().to_node_ptr(value);
       BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
       node_algorithms::link_after(this->get_last_node(), n);
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          this->set_last_node(n);
       }
       this->priv_size_traits().increment();
@@ -473,7 +472,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
-   void pop_front()
+   void pop_front() BOOST_NOEXCEPT
    {  return this->pop_front_and_dispose(detail::null_disposer());   }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -487,15 +486,15 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators to the erased element.
    template<class Disposer>
-   void pop_front_and_dispose(Disposer disposer)
+   void pop_front_and_dispose(Disposer disposer) BOOST_NOEXCEPT
    {
       node_ptr to_erase = node_traits::get_next(this->get_root_node());
       node_algorithms::unlink_after(this->get_root_node());
       this->priv_size_traits().decrement();
-      if(safemode_or_autounlink)
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink)
          node_algorithms::init(to_erase);
       disposer(priv_value_traits().to_value_ptr(to_erase));
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          if(this->empty()){
             this->set_last_node(this->get_root_node());
          }
@@ -507,7 +506,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   reference front()
+   BOOST_INTRUSIVE_FORCEINLINE reference front() BOOST_NOEXCEPT
    { return *this->priv_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
 
    //! <b>Effects</b>: Returns a const_reference to the first element of the list.
@@ -515,7 +514,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_reference front() const
+   BOOST_INTRUSIVE_FORCEINLINE const_reference front() const BOOST_NOEXCEPT
    { return *this->priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_next(this->get_root_node()))); }
 
    //! <b>Effects</b>: Returns a reference to the last element of the list.
@@ -526,7 +525,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    //!   This function is only available is cache_last<> is true.
-   reference back()
+   reference back() BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT((cache_last));
       return *this->priv_value_traits().to_value_ptr(this->get_last_node());
@@ -540,7 +539,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    //!   This function is only available is cache_last<> is true.
-   const_reference back() const
+   BOOST_INTRUSIVE_FORCEINLINE const_reference back() const BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT((cache_last));
       return *this->priv_value_traits().to_value_ptr(this->get_last_node());
@@ -551,7 +550,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   iterator begin()
+   BOOST_INTRUSIVE_FORCEINLINE iterator begin() BOOST_NOEXCEPT
    { return iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
@@ -559,7 +558,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator begin() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT
    { return const_iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
@@ -567,7 +566,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator cbegin() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT
    { return const_iterator(node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns an iterator to the end of the list.
@@ -575,7 +574,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   iterator end()
+   BOOST_INTRUSIVE_FORCEINLINE iterator end() BOOST_NOEXCEPT
    { return iterator(this->get_end_node(), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns a const_iterator to the end of the list.
@@ -583,7 +582,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator end() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT
    { return const_iterator(detail::uncast(this->get_end_node()), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns a const_iterator to the end of the list.
@@ -591,7 +590,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator cend() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT
    { return this->end(); }
 
    //! <b>Effects</b>: Returns an iterator that points to a position
@@ -600,7 +599,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   iterator before_begin()
+   BOOST_INTRUSIVE_FORCEINLINE iterator before_begin() BOOST_NOEXCEPT
    { return iterator(this->get_root_node(), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns an iterator that points to a position
@@ -609,7 +608,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator before_begin() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator before_begin() const BOOST_NOEXCEPT
    { return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
 
    //! <b>Effects</b>: Returns an iterator that points to a position
@@ -618,7 +617,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   const_iterator cbefore_begin() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator cbefore_begin() const BOOST_NOEXCEPT
    { return this->before_begin(); }
 
    //! <b>Effects</b>: Returns an iterator to the last element contained in the list.
@@ -628,7 +627,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: This function is present only if cached_last<> option is true.
-   iterator last()
+   BOOST_INTRUSIVE_FORCEINLINE iterator last() BOOST_NOEXCEPT
    {
       //This function shall not be used if cache_last is not true
       BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
@@ -642,7 +641,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: This function is present only if cached_last<> option is true.
-   const_iterator last() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator last() const BOOST_NOEXCEPT
    {
       //This function shall not be used if cache_last is not true
       BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
@@ -656,7 +655,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: This function is present only if cached_last<> option is true.
-   const_iterator clast() const
+   BOOST_INTRUSIVE_FORCEINLINE const_iterator clast() const BOOST_NOEXCEPT
    { return const_iterator(this->get_last_node(), this->priv_value_traits_ptr()); }
 
    //! <b>Precondition</b>: end_iterator must be a valid end iterator
@@ -667,7 +666,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   static slist_impl &container_from_end_iterator(iterator end_iterator)
+   BOOST_INTRUSIVE_FORCEINLINE static slist_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
    {  return slist_impl::priv_container_from_end_iterator(end_iterator);   }
 
    //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
@@ -678,7 +677,7 @@ class slist_impl
    //! <b>Throws</b>: Nothing.
    //!
    //! <b>Complexity</b>: Constant.
-   static const slist_impl &container_from_end_iterator(const_iterator end_iterator)
+   BOOST_INTRUSIVE_FORCEINLINE static const slist_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
    {  return slist_impl::priv_container_from_end_iterator(end_iterator);   }
 
    //! <b>Effects</b>: Returns the number of the elements contained in the list.
@@ -689,9 +688,9 @@ class slist_impl
    //!   if constant_time_size is false. Constant time otherwise.
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   size_type size() const
+   BOOST_INTRUSIVE_FORCEINLINE size_type size() const BOOST_NOEXCEPT
    {
-      if(constant_time_size)
+      BOOST_IF_CONSTEXPR(constant_time_size)
          return this->priv_size_traits().get_size();
       else
          return node_algorithms::count(this->get_root_node()) - 1;
@@ -704,7 +703,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   bool empty() const
+   BOOST_INTRUSIVE_FORCEINLINE bool empty() const BOOST_NOEXCEPT
    { return node_algorithms::unique(this->get_root_node()); }
 
    //! <b>Effects</b>: Swaps the elements of x and *this.
@@ -717,7 +716,7 @@ class slist_impl
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    void swap(slist_impl& other)
    {
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          priv_swap_cache_last(this, &other);
       }
       else{
@@ -735,7 +734,7 @@ class slist_impl
    //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
    //!
    //! <b>Note</b>: Iterators Does not affect the validity of iterators and references.
-   void shift_backwards(size_type n = 1)
+   void shift_backwards(size_type n = 1) BOOST_NOEXCEPT
    {  this->priv_shift_backwards(n, detail::bool_<linear>());  }
 
    //! <b>Effects</b>: Moves forward all the elements, so that the second
@@ -747,7 +746,7 @@ class slist_impl
    //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   void shift_forward(size_type n = 1)
+   void shift_forward(size_type n = 1) BOOST_NOEXCEPT
    {  this->priv_shift_forward(n, detail::bool_<linear>()); }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -819,7 +818,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant.
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   iterator insert_after(const_iterator prev_p, reference value)
+   iterator insert_after(const_iterator prev_p, reference value) BOOST_NOEXCEPT
    {
       node_ptr n = priv_value_traits().to_node_ptr(value);
       BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
@@ -845,7 +844,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    template<class Iterator>
-   void insert_after(const_iterator prev_p, Iterator f, Iterator l)
+   void insert_after(const_iterator prev_p, Iterator f, Iterator l) BOOST_NOEXCEPT
    {
       //Insert first nodes avoiding cache and size checks
       size_type count = 0;
@@ -860,7 +859,7 @@ class slist_impl
       if(cache_last && (this->get_last_node() == prev_p.pointed_node())){
          this->set_last_node(prev_n);
       }
-      if(constant_time_size){
+      BOOST_IF_CONSTEXPR(constant_time_size){
          this->priv_size_traits().increase(count);
       }
    }
@@ -877,7 +876,7 @@ class slist_impl
    //!  Constant-time if cache_last<> is true and p == end().
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
-   iterator insert(const_iterator p, reference value)
+   iterator insert(const_iterator p, reference value) BOOST_NOEXCEPT
    {  return this->insert_after(this->previous(p), value);  }
 
    //! <b>Requires</b>: Dereferencing iterator must yield
@@ -895,7 +894,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Does not affect the validity of iterators and references.
    template<class Iterator>
-   void insert(const_iterator p, Iterator b, Iterator e)
+   void insert(const_iterator p, Iterator b, Iterator e) BOOST_NOEXCEPT
    {  return this->insert_after(this->previous(p), b, e);  }
 
    //! <b>Effects</b>: Erases the element after the element pointed by prev of
@@ -910,7 +909,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
-   iterator erase_after(const_iterator prev)
+   iterator erase_after(const_iterator prev) BOOST_NOEXCEPT
    {  return this->erase_after_and_dispose(prev, detail::null_disposer());  }
 
    //! <b>Effects</b>: Erases the range (before_f, l) from
@@ -926,15 +925,15 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
-   iterator erase_after(const_iterator before_f, const_iterator l)
+   iterator erase_after(const_iterator before_f, const_iterator l) BOOST_NOEXCEPT
    {
-      if(safemode_or_autounlink || constant_time_size){
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink || constant_time_size){
          return this->erase_after_and_dispose(before_f, l, detail::null_disposer());
       }
       else{
          const node_ptr bfp = before_f.pointed_node();
          const node_ptr lp = l.pointed_node();
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             if(lp == this->get_end_node()){
                this->set_last_node(bfp);
             }
@@ -958,22 +957,23 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
-   iterator erase_after(const_iterator before_f, const_iterator l, size_type n)
+   iterator erase_after(const_iterator before_f, const_iterator l, size_type n) BOOST_NOEXCEPT
    {
       BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance((++const_iterator(before_f)).pointed_node(), l.pointed_node()) == n);
-      if(safemode_or_autounlink){
+      (void)n;
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink){
          return this->erase_after(before_f, l);
       }
       else{
          const node_ptr bfp = before_f.pointed_node();
          const node_ptr lp = l.pointed_node();
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             if((lp == this->get_end_node())){
                this->set_last_node(bfp);
             }
          }
          node_algorithms::unlink_after(bfp, lp);
-         if(constant_time_size){
+         BOOST_IF_CONSTEXPR(constant_time_size){
             this->priv_size_traits().decrease(n);
          }
          return l.unconst();
@@ -992,7 +992,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
-   iterator erase(const_iterator i)
+   iterator erase(const_iterator i) BOOST_NOEXCEPT
    {  return this->erase_after(this->previous(i));  }
 
    //! <b>Requires</b>: f and l must be valid iterator to elements in *this.
@@ -1009,7 +1009,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased elements.
-   iterator erase(const_iterator f, const_iterator l)
+   iterator erase(const_iterator f, const_iterator l) BOOST_NOEXCEPT
    {  return this->erase_after(this->previous(f), l);  }
 
    //! <b>Effects</b>: Erases the range [f, l) from
@@ -1026,7 +1026,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
-   iterator erase(const_iterator f, const_iterator l, size_type n)
+   iterator erase(const_iterator f, const_iterator l, size_type n) BOOST_NOEXCEPT
    {  return this->erase_after(this->previous(f), l, n);  }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -1044,7 +1044,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators to the erased element.
    template<class Disposer>
-   iterator erase_after_and_dispose(const_iterator prev, Disposer disposer)
+   iterator erase_after_and_dispose(const_iterator prev, Disposer disposer) BOOST_NOEXCEPT
    {
       const_iterator it(prev);
       ++it;
@@ -1055,7 +1055,7 @@ class slist_impl
       if(cache_last && (to_erase == this->get_last_node())){
          this->set_last_node(prev_n);
       }
-      if(safemode_or_autounlink)
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink)
          node_algorithms::init(to_erase);
       disposer(priv_value_traits().to_value_ptr(to_erase));
       this->priv_size_traits().decrement();
@@ -1064,7 +1064,7 @@ class slist_impl
 
    /// @cond
 
-   static iterator s_insert_after(const_iterator const prev_p, reference value)
+   static iterator s_insert_after(const_iterator const prev_p, reference value) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
       node_ptr const n = value_traits::to_node_ptr(value);
@@ -1074,7 +1074,7 @@ class slist_impl
    }
 
    template<class Disposer>
-   static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer)
+   static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
       const_iterator it(prev);
@@ -1083,14 +1083,14 @@ class slist_impl
       ++it;
       node_ptr prev_n(prev.pointed_node());
       node_algorithms::unlink_after(prev_n);
-      if(safemode_or_autounlink)
+      BOOST_IF_CONSTEXPR(safemode_or_autounlink)
          node_algorithms::init(to_erase);
       disposer(value_traits::to_value_ptr(to_erase));
       return it.unconst();
    }
 
    template<class Disposer>
-   static iterator s_erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
+   static iterator s_erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
       node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
@@ -1099,14 +1099,14 @@ class slist_impl
       while(fp != lp){
          node_ptr to_erase(fp);
          fp = node_traits::get_next(fp);
-         if(safemode_or_autounlink)
+         BOOST_IF_CONSTEXPR(safemode_or_autounlink)
             node_algorithms::init(to_erase);
          disposer(value_traits::to_value_ptr(to_erase));
       }
       return l.unconst();
    }
 
-   static iterator s_erase_after(const_iterator prev)
+   static iterator s_erase_after(const_iterator prev) BOOST_NOEXCEPT
    {  return s_erase_after_and_dispose(prev, detail::null_disposer());  }
 
    /// @endcond
@@ -1126,7 +1126,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Invalidates the iterators to the erased element.
    template<class Disposer>
-   iterator erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
+   iterator erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer) BOOST_NOEXCEPT
    {
       node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
       node_ptr fp(node_traits::get_next(bfp));
@@ -1134,7 +1134,7 @@ class slist_impl
       while(fp != lp){
          node_ptr to_erase(fp);
          fp = node_traits::get_next(fp);
-         if(safemode_or_autounlink)
+         BOOST_IF_CONSTEXPR(safemode_or_autounlink)
             node_algorithms::init(to_erase);
          disposer(priv_value_traits().to_value_ptr(to_erase));
          this->priv_size_traits().decrement();
@@ -1161,12 +1161,12 @@ class slist_impl
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased element.
    template<class Disposer>
-   iterator erase_and_dispose(const_iterator i, Disposer disposer)
+   iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT
    {  return this->erase_after_and_dispose(this->previous(i), disposer);  }
 
    #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
    template<class Disposer>
-   iterator erase_and_dispose(iterator i, Disposer disposer)
+   iterator erase_and_dispose(iterator i, Disposer disposer) BOOST_NOEXCEPT
    {  return this->erase_and_dispose(const_iterator(i), disposer);   }
    #endif
 
@@ -1188,7 +1188,7 @@ class slist_impl
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //!   erased elements.
    template<class Disposer>
-   iterator erase_and_dispose(const_iterator f, const_iterator l, Disposer disposer)
+   iterator erase_and_dispose(const_iterator f, const_iterator l, Disposer disposer) BOOST_NOEXCEPT
    {  return this->erase_after_and_dispose(this->previous(f), l, disposer);  }
 
    //! <b>Requires</b>: Dereferencing iterator must yield
@@ -1257,7 +1257,7 @@ class slist_impl
    //!   assigned to the last spliced element or prev if x is empty.
    //!   This iterator can be used as new "prev" iterator for a new splice_after call.
    //!   that will splice new values after the previously spliced values.
-   void splice_after(const_iterator prev, slist_impl &x, const_iterator *l = 0)
+   void splice_after(const_iterator prev, slist_impl &x, const_iterator *l = 0) BOOST_NOEXCEPT
    {
       if(x.empty()){
          if(l) *l = prev;
@@ -1270,7 +1270,7 @@ class slist_impl
          const_iterator last_x(x.previous(x.end()));  //constant time if cache_last is active
          node_ptr prev_n(prev.pointed_node());
          node_ptr last_x_n(last_x.pointed_node());
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             x.set_last_node(x.get_root_node());
             if(node_traits::get_next(prev_n) == this->get_end_node()){
                this->set_last_node(last_x_n);
@@ -1296,7 +1296,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //! list. Iterators of this list and all the references are not invalidated.
-   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator prev_ele)
+   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator prev_ele) BOOST_NOEXCEPT
    {
       const_iterator elem = prev_ele;
       this->splice_after(prev_pos, x, prev_ele, ++elem, 1);
@@ -1317,9 +1317,9 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //!   list. Iterators of this list and all the references are not invalidated.
-   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l)
+   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l) BOOST_NOEXCEPT
    {
-      if(constant_time_size)
+      BOOST_IF_CONSTEXPR(constant_time_size)
          this->splice_after(prev_pos, x, before_f, before_l, node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()));
       else
          this->priv_splice_after
@@ -1340,12 +1340,13 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //!   list. Iterators of this list and all the references are not invalidated.
-   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l, size_type n)
+   void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l, size_type n) BOOST_NOEXCEPT
    {
       BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()) == n);
+      (void)n;
       this->priv_splice_after
          (prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
-      if(constant_time_size){
+      BOOST_IF_CONSTEXPR(constant_time_size){
          this->priv_size_traits().increase(n);
          x.priv_size_traits().decrease(n);
       }
@@ -1372,7 +1373,7 @@ class slist_impl
    //!   assigned to the last spliced element or prev if x is empty.
    //!   This iterator can be used as new "prev" iterator for a new splice_after call.
    //!   that will splice new values after the previously spliced values.
-   void splice(const_iterator it, slist_impl &x, const_iterator *l = 0)
+   void splice(const_iterator it, slist_impl &x, const_iterator *l = 0) BOOST_NOEXCEPT
    {  this->splice_after(this->previous(it), x, l);   }
 
    //! <b>Requires</b>: it p must be a valid iterator of *this.
@@ -1389,7 +1390,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //! list. Iterators of this list and all the references are not invalidated.
-   void splice(const_iterator pos, slist_impl &x, const_iterator elem)
+   void splice(const_iterator pos, slist_impl &x, const_iterator elem) BOOST_NOEXCEPT
    {  return this->splice_after(this->previous(pos), x, x.previous(elem));  }
 
    //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
@@ -1409,7 +1410,7 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //!   list. Iterators of this list and all the references are not invalidated.
-   void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l)
+   void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l) BOOST_NOEXCEPT
    {  return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l));  }
 
    //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
@@ -1428,10 +1429,10 @@ class slist_impl
    //!
    //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
    //!   list. Iterators of this list and all the references are not invalidated.
-   void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l, size_type n)
+   void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l, size_type n) BOOST_NOEXCEPT
    {  return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l), n);  }
 
-   //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+   //! <b>Effects</b>: This function sorts the list *this according to operator<.
    //!   The sort is stable, that is, the relative order of equivalent elements is preserved.
    //!
    //! <b>Throws</b>: If value_traits::node_traits::node
@@ -1463,7 +1464,7 @@ class slist_impl
             BOOST_INTRUSIVE_INVARIANT_ASSERT(counter[i].empty());
             const_iterator last_element(carry.previous(last_inserted, carry.end()));
 
-            if(constant_time_size){
+            BOOST_IF_CONSTEXPR(constant_time_size){
                counter[i].splice_after( counter[i].cbefore_begin(), carry
                                     , carry.cbefore_begin(), last_element
                                     , carry.size());
@@ -1480,7 +1481,7 @@ class slist_impl
             counter[i].merge(counter[i-1], p, &last_inserted);
          --fill;
          const_iterator last_element(counter[fill].previous(last_inserted, counter[fill].end()));
-         if(constant_time_size){
+         BOOST_IF_CONSTEXPR(constant_time_size){
             this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin()
                               , last_element, counter[fill].size());
          }
@@ -1501,14 +1502,14 @@ class slist_impl
    //!
    //! <b>Throws</b>: If value_traits::node_traits::node
    //!   constructor throws (this does not happen with predefined Boost.Intrusive hooks)
-   //!   or std::less<value_type> throws. Basic guarantee.
+   //!   or operator< throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: This function is linear time: it performs at most
    //!   size() + x.size() - 1 comparisons.
    //!
    //! <b>Note</b>: Iterators and references are not invalidated.
    void sort()
-   { this->sort(std::less<value_type>()); }
+   { this->sort(value_less<value_type>()); }
 
    //! <b>Requires</b>: p must be a comparison function that induces a strict weak
    //!   ordering and both *this and x must be sorted according to that ordering
@@ -1557,18 +1558,18 @@ class slist_impl
    }
 
    //! <b>Effects</b>: This function removes all of x's elements and inserts them
-   //!   in order into *this according to std::less<value_type>. The merge is stable;
+   //!   in order into *this according to operator<. The merge is stable;
    //!   that is, if an element from *this is equivalent to one from x, then the element
    //!   from *this will precede the one from x.
    //!
-   //! <b>Throws</b>: if std::less<value_type> throws. Basic guarantee.
+   //! <b>Throws</b>: if operator< throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: This function is linear time: it performs at most
    //!   size() + x.size() - 1 comparisons.
    //!
    //! <b>Note</b>: Iterators and references are not invalidated
    void merge(slist_impl& x)
-   {  this->merge(x, std::less<value_type>());  }
+   {  this->merge(x, value_less<value_type>());  }
 
    //! <b>Effects</b>: Reverses the order of elements in the list.
    //!
@@ -1577,7 +1578,7 @@ class slist_impl
    //! <b>Complexity</b>: This function is linear to the contained elements.
    //!
    //! <b>Note</b>: Iterators and references are not invalidated
-   void reverse()
+   void reverse() BOOST_NOEXCEPT
    {
       if(cache_last && !this->empty()){
          this->set_last_node(node_traits::get_next(this->get_root_node()));
@@ -1588,14 +1589,14 @@ class slist_impl
    //! <b>Effects</b>: Removes all the elements that compare equal to value.
    //!   No destructors are called.
    //!
-   //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+   //! <b>Throws</b>: If operator== throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
    //!
    //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
    //!   and iterators to elements that are not removed remain valid. This function is
    //!   linear time: it performs exactly size() comparisons for equality.
-   void remove(const_reference value)
+   void remove(const_reference value) BOOST_NOEXCEPT
    {  this->remove_if(detail::equal_to_value<const_reference>(value));  }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -1603,14 +1604,14 @@ class slist_impl
    //! <b>Effects</b>: Removes all the elements that compare equal to value.
    //!   Disposer::operator()(pointer) is called for every removed element.
    //!
-   //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+   //! <b>Throws</b>: If operator== throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
    //!
    //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
    //!   and iterators to elements that are not removed remain valid.
    template<class Disposer>
-   void remove_and_dispose(const_reference value, Disposer disposer)
+   void remove_and_dispose(const_reference value, Disposer disposer) BOOST_NOEXCEPT
    {  this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer);  }
 
    //! <b>Effects</b>: Removes all the elements for which a specified
@@ -1630,7 +1631,7 @@ class slist_impl
       node_algorithms::stable_partition
          (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
       //After cache last is set, slist invariants are preserved...
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          this->set_last_node(info.new_last_node);
       }
       //...so erase can be safely called
@@ -1659,7 +1660,7 @@ class slist_impl
       node_algorithms::stable_partition
          (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
       //After cache last is set, slist invariants are preserved...
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          this->set_last_node(info.new_last_node);
       }
       //...so erase can be safely called
@@ -1671,14 +1672,14 @@ class slist_impl
    //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
    //!   elements that are equal from the list. No destructors are called.
    //!
-   //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+   //! <b>Throws</b>: If operator== throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: Linear time (size()-1) comparisons calls to pred()).
    //!
    //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
    //!   and iterators to elements that are not removed remain valid.
    void unique()
-   {  this->unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer());  }
+   {  this->unique_and_dispose(value_equal<value_type>(), detail::null_disposer());  }
 
    //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
    //!   elements that satisfy some binary predicate from the list.
@@ -1700,7 +1701,7 @@ class slist_impl
    //!   elements that satisfy some binary predicate from the list.
    //!   Disposer::operator()(pointer) is called for every removed element.
    //!
-   //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+   //! <b>Throws</b>: If operator== throws. Basic guarantee.
    //!
    //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
    //!
@@ -1708,7 +1709,7 @@ class slist_impl
    //!   and iterators to elements that are not removed remain valid.
    template<class Disposer>
    void unique_and_dispose(Disposer disposer)
-   {  this->unique(std::equal_to<value_type>(), disposer);  }
+   {  this->unique(value_equal<value_type>(), disposer);  }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
    //!
@@ -1739,7 +1740,7 @@ class slist_impl
                ++cur;
             }
          }
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             this->set_last_node(bcur.pointed_node());
          }
       }
@@ -1756,7 +1757,7 @@ class slist_impl
    //! <b>Note</b>: Iterators and references are not invalidated.
    //!   This static function is available only if the <i>value traits</i>
    //!   is stateless.
-   static iterator s_iterator_to(reference value)
+   static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT((!stateful_value_traits));
       return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
@@ -1773,7 +1774,7 @@ class slist_impl
    //! <b>Note</b>: Iterators and references are not invalidated.
    //!   This static function is available only if the <i>value traits</i>
    //!   is stateless.
-   static const_iterator s_iterator_to(const_reference value)
+   static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
    {
       BOOST_STATIC_ASSERT((!stateful_value_traits));
       reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
@@ -1789,7 +1790,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant time.
    //!
    //! <b>Note</b>: Iterators and references are not invalidated.
-   iterator iterator_to(reference value)
+   iterator iterator_to(reference value) BOOST_NOEXCEPT
    {
       BOOST_INTRUSIVE_INVARIANT_ASSERT(linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(value)));
       return iterator (this->priv_value_traits().to_node_ptr(value), this->priv_value_traits_ptr());
@@ -1804,7 +1805,7 @@ class slist_impl
    //! <b>Complexity</b>: Constant time.
    //!
    //! <b>Note</b>: Iterators and references are not invalidated.
-   const_iterator iterator_to(const_reference value) const
+   const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT
    {
       reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
       BOOST_INTRUSIVE_INVARIANT_ASSERT (linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(r)));
@@ -1819,7 +1820,7 @@ class slist_impl
    //!
    //! <b>Complexity</b>: Linear to the number of elements before i.
    //!   Constant if cache_last<> is true and i == end().
-   iterator previous(iterator i)
+   iterator previous(iterator i) BOOST_NOEXCEPT
    {  return this->previous(this->cbefore_begin(), i); }
 
    //! <b>Returns</b>: The const_iterator to the element before i in the list.
@@ -1830,7 +1831,7 @@ class slist_impl
    //!
    //! <b>Complexity</b>: Linear to the number of elements before i.
    //!   Constant if cache_last<> is true and i == end().
-   const_iterator previous(const_iterator i) const
+   const_iterator previous(const_iterator i) const BOOST_NOEXCEPT
    {  return this->previous(this->cbefore_begin(), i); }
 
    //! <b>Returns</b>: The iterator to the element before i in the list,
@@ -1842,7 +1843,7 @@ class slist_impl
    //!
    //! <b>Complexity</b>: Linear to the number of elements before i.
    //!   Constant if cache_last<> is true and i == end().
-   iterator previous(const_iterator prev_from, iterator i)
+   iterator previous(const_iterator prev_from, iterator i) BOOST_NOEXCEPT
    {  return this->previous(prev_from, const_iterator(i)).unconst(); }
 
    //! <b>Returns</b>: The const_iterator to the element before i in the list,
@@ -1854,7 +1855,7 @@ class slist_impl
    //!
    //! <b>Complexity</b>: Linear to the number of elements before i.
    //!   Constant if cache_last<> is true and i == end().
-   const_iterator previous(const_iterator prev_from, const_iterator i) const
+   const_iterator previous(const_iterator prev_from, const_iterator i) const BOOST_NOEXCEPT
    {
       if(cache_last && (i.pointed_node() == this->get_end_node())){
          return const_iterator(detail::uncast(this->get_last_node()), this->priv_value_traits_ptr());
@@ -1882,9 +1883,9 @@ class slist_impl
    //!   point to elements of this list. Iterators of this list and all the references are not invalidated.
    //!
    //! <b>Warning</b>: Experimental function, don't use it!
-   void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l)
+   void incorporate_after(const_iterator prev_pos, node_ptr f, node_ptr before_l) BOOST_NOEXCEPT
    {
-      if(constant_time_size)
+      BOOST_IF_CONSTEXPR(constant_time_size)
          this->incorporate_after(prev_pos, f, before_l, node_algorithms::distance(f.pointed_node(), before_l.pointed_node())+1);
       else
          this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
@@ -1906,7 +1907,7 @@ class slist_impl
    //!   point to elements of this list. Iterators of this list and all the references are not invalidated.
    //!
    //! <b>Warning</b>: Experimental function, don't use it!
-   void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l, size_type n)
+   void incorporate_after(const_iterator prev_pos, node_ptr f, node_ptr before_l, size_type n) BOOST_NOEXCEPT
    {
       if(n){
          BOOST_INTRUSIVE_INVARIANT_ASSERT(n > 0);
@@ -1916,7 +1917,7 @@ class slist_impl
                , iterator(before_l, this->priv_value_traits_ptr())))
             +1 == n);
          this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
-         if(constant_time_size){
+         BOOST_IF_CONSTEXPR(constant_time_size){
             this->priv_size_traits().increase(n);
          }
       }
@@ -2007,7 +2008,7 @@ class slist_impl
 
    void priv_incorporate_after(node_ptr prev_pos_n, node_ptr first_n, node_ptr before_l_n)
    {
-      if(cache_last){
+      BOOST_IF_CONSTEXPR(cache_last){
          if(prev_pos_n == this->get_last_node()){
             this->set_last_node(before_l_n);
          }
@@ -2035,12 +2036,12 @@ class slist_impl
 
    void priv_shift_backwards(size_type n, detail::bool_<true>)
    {
-      std::pair<node_ptr, node_ptr> ret(
+      typename node_algorithms::node_pair ret(
          node_algorithms::move_first_n_forward
             (node_traits::get_next(this->get_root_node()), (std::size_t)n));
       if(ret.first){
          node_traits::set_next(this->get_root_node(), ret.first);
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             this->set_last_node(ret.second);
          }
       }
@@ -2056,12 +2057,12 @@ class slist_impl
 
    void priv_shift_forward(size_type n, detail::bool_<true>)
    {
-      std::pair<node_ptr, node_ptr> ret(
+      typename node_algorithms::node_pair ret(
          node_algorithms::move_first_n_backwards
          (node_traits::get_next(this->get_root_node()), (std::size_t)n));
       if(ret.first){
          node_traits::set_next(this->get_root_node(), ret.first);
-         if(cache_last){
+         BOOST_IF_CONSTEXPR(cache_last){
             this->set_last_node(ret.second);
          }
       }
@@ -2209,7 +2210,7 @@ class slist
 
    struct incorporate_t{};
 
-   BOOST_INTRUSIVE_FORCEINLINE slist( const node_ptr & f, const node_ptr & before_l
+   BOOST_INTRUSIVE_FORCEINLINE slist( node_ptr f, node_ptr before_l
              , size_type n, const value_traits &v_traits = value_traits())
       :  Base(f, before_l, n, v_traits)
    {}
@@ -2234,10 +2235,10 @@ class slist
    BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(slist) src, Cloner cloner, Disposer disposer)
    {  Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer);  }
 
-   BOOST_INTRUSIVE_FORCEINLINE static slist &container_from_end_iterator(iterator end_iterator)
+   BOOST_INTRUSIVE_FORCEINLINE static slist &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
    {  return static_cast<slist &>(Base::container_from_end_iterator(end_iterator));   }
 
-   BOOST_INTRUSIVE_FORCEINLINE static const slist &container_from_end_iterator(const_iterator end_iterator)
+   BOOST_INTRUSIVE_FORCEINLINE static const slist &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
    {  return static_cast<const slist &>(Base::container_from_end_iterator(end_iterator));   }
 };