Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56918 - in branches/release/boost/interprocess: containers/container containers/container/detail detail
From: igaztanaga_at_[hidden]
Date: 2009-10-16 10:54:25


Author: igaztanaga
Date: 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
New Revision: 56918
URL: http://svn.boost.org/trac/boost/changeset/56918

Log:
Fixes for 1.41
Removed:
   branches/release/boost/interprocess/containers/container/containers_fwd.hpp
Text files modified:
   branches/release/boost/interprocess/containers/container/deque.hpp | 9 ++++++---
   branches/release/boost/interprocess/containers/container/detail/advanced_insert_int.hpp | 8 +++-----
   branches/release/boost/interprocess/containers/container/detail/flat_tree.hpp | 8 ++++----
   branches/release/boost/interprocess/containers/container/stable_vector.hpp | 4 ++--
   branches/release/boost/interprocess/containers/container/vector.hpp | 8 ++++----
   branches/release/boost/interprocess/detail/named_proxy.hpp | 2 +-
   6 files changed, 20 insertions(+), 19 deletions(-)

Deleted: branches/release/boost/interprocess/containers/container/containers_fwd.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/containers_fwd.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
+++ (empty file)
@@ -1,153 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2008. 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)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINERS_CONTAINERS_FWD_HPP
-#define BOOST_CONTAINERS_CONTAINERS_FWD_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif
-
-//////////////////////////////////////////////////////////////////////////////
-// Standard predeclarations
-//////////////////////////////////////////////////////////////////////////////
-
-/// @cond
-
-namespace boost{
-namespace intrusive{
- //Create namespace to avoid compilation errors
-}}
-
-namespace boost{ namespace interprocess_container{ namespace containers_detail{
-
-namespace bi = boost::intrusive;
-
-}}}
-
-namespace std {
-
-template <class T>
-class allocator;
-
-template <class T>
-struct less;
-
-template <class T1, class T2>
-struct pair;
-
-template <class CharType>
-struct char_traits;
-
-} //namespace std {
-
-/// @endcond
-
-//////////////////////////////////////////////////////////////////////////////
-// Containers
-//////////////////////////////////////////////////////////////////////////////
-
-#ifdef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-namespace boost {
-namespace interprocess {
-#else
-namespace boost {
-namespace interprocess_container {
-#endif
-
-//vector class
-template <class T
- ,class A = std::allocator<T> >
-class vector;
-
-//vector class
-template <class T
-,class A = std::allocator<T> >
-class deque;
-
-//list class
-template <class T
- ,class A = std::allocator<T> >
-class list;
-
-//slist class
-template <class T
- ,class Alloc = std::allocator<T> >
-class slist;
-
-//set class
-template <class T
- ,class Pred = std::less<T>
- ,class Alloc = std::allocator<T> >
-class set;
-
-//multiset class
-template <class T
- ,class Pred = std::less<T>
- ,class Alloc = std::allocator<T> >
-class multiset;
-
-//map class
-template <class Key
- ,class T
- ,class Pred = std::less<Key>
- ,class Alloc = std::allocator<std::pair<const Key, T> > >
-class map;
-
-//multimap class
-template <class Key
- ,class T
- ,class Pred = std::less<Key>
- ,class Alloc = std::allocator<std::pair<const Key, T> > >
-class multimap;
-
-//flat_set class
-template <class T
- ,class Pred = std::less<T>
- ,class Alloc = std::allocator<T> >
-class flat_set;
-
-//flat_multiset class
-template <class T
- ,class Pred = std::less<T>
- ,class Alloc = std::allocator<T> >
-class flat_multiset;
-
-//flat_map class
-template <class Key
- ,class T
- ,class Pred = std::less<Key>
- ,class Alloc = std::allocator<std::pair<Key, T> > >
-class flat_map;
-
-//flat_multimap class
-template <class Key
- ,class T
- ,class Pred = std::less<Key>
- ,class Alloc = std::allocator<std::pair<Key, T> > >
-class flat_multimap;
-
-//basic_string class
-template <class CharT
- ,class Traits = std::char_traits<CharT>
- ,class Alloc = std::allocator<CharT> >
-class basic_string;
-
-//string class
-typedef basic_string
- <char
- ,std::char_traits<char>
- ,std::allocator<char> >
-string;
-
-}} //namespace boost { namespace interprocess_container {
-
-#endif //#ifndef BOOST_CONTAINERS_CONTAINERS_FWD_HPP
-

Modified: branches/release/boost/interprocess/containers/container/deque.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/deque.hpp (original)
+++ branches/release/boost/interprocess/containers/container/deque.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -814,7 +814,8 @@
          this->priv_push_back_simple_commit();
       }
       else{
- containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> proxy(boost::interprocess::forward<Args>(args)...);
+ typedef containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> type;
+ type &&proxy = type(boost::interprocess::forward<Args>(args)...);
          this->priv_insert_aux_impl(this->cend(), 1, proxy);
       }
    }
@@ -827,7 +828,8 @@
          this->priv_push_front_simple_commit();
       }
       else{
- containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> proxy(boost::interprocess::forward<Args>(args)...);
+ typedef containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> type;
+ type &&proxy = type(boost::interprocess::forward<Args>(args)...);
          this->priv_insert_aux_impl(this->cbegin(), 1, proxy);
       }
    }
@@ -845,7 +847,8 @@
       }
       else{
          size_type n = p - this->cbegin();
- containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> proxy(boost::interprocess::forward<Args>(args)...);
+ typedef containers_detail::advanced_insert_aux_emplace<T, iterator, Args...> type;
+ type &&proxy = type(boost::interprocess::forward<Args>(args)...);
          this->priv_insert_aux_impl(p, 1, proxy);
          return iterator(this->begin() + n);
       }

Modified: branches/release/boost/interprocess/containers/container/detail/advanced_insert_int.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/detail/advanced_insert_int.hpp (original)
+++ branches/release/boost/interprocess/containers/container/detail/advanced_insert_int.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -180,7 +180,7 @@
    typedef typename advanced_insert_aux_int<T, Iterator>::difference_type difference_type;
    typedef typename build_number_seq<sizeof...(Args)>::type index_tuple_t;
 
- advanced_insert_aux_emplace(Args&&... args)
+ explicit advanced_insert_aux_emplace(Args&&... args)
       : args_(args...), used_(false)
    {}
 
@@ -204,8 +204,7 @@
    void priv_copy_all_to(const index_tuple<IdxPack...>&, Iterator p)
    {
       if(!used_){
- T object(boost::interprocess::forward<Args>(get<IdxPack>(args_))...);
- *p = boost::interprocess::move(object);
+ *p = boost::interprocess::move(T (boost::interprocess::forward<Args>(get<IdxPack>(args_))...));
          used_ = true;
       }
    }
@@ -237,8 +236,7 @@
       assert(division_count <=1);
       if((first_n && division_count == 1) || (!first_n && division_count == 0)){
          if(!used_){
- T object(boost::interprocess::forward<Args>(get<IdxPack>(args_))...);
- *p = boost::interprocess::move(object);
+ *p = boost::interprocess::move(T(boost::interprocess::forward<Args>(get<IdxPack>(args_))...));
             used_ = true;
          }
       }

Modified: branches/release/boost/interprocess/containers/container/detail/flat_tree.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/detail/flat_tree.hpp (original)
+++ branches/release/boost/interprocess/containers/container/detail/flat_tree.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -340,7 +340,7 @@
    template <class... Args>
    iterator emplace_unique(Args&&... args)
    {
- value_type val(boost::interprocess::forward<Args>(args)...);
+ value_type && val = value_type(boost::interprocess::forward<Args>(args)...);
       insert_commit_data data;
       std::pair<iterator,bool> ret =
          priv_insert_unique_prepare(val, data);
@@ -353,7 +353,7 @@
    template <class... Args>
    iterator emplace_hint_unique(const_iterator hint, Args&&... args)
    {
- value_type val(boost::interprocess::forward<Args>(args)...);
+ value_type && val = value_type(boost::interprocess::forward<Args>(args)...);
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);
       if(ret.second){
@@ -365,7 +365,7 @@
    template <class... Args>
    iterator emplace_equal(Args&&... args)
    {
- value_type val(boost::interprocess::forward<Args>(args)...);
+ value_type &&val = value_type(boost::interprocess::forward<Args>(args)...);
       iterator i = this->upper_bound(KeyOfValue()(val));
       i = this->m_data.m_vect.insert(i, boost::interprocess::move<value_type>(val));
       return i;
@@ -374,7 +374,7 @@
    template <class... Args>
    iterator emplace_hint_equal(const_iterator hint, Args&&... args)
    {
- value_type val(boost::interprocess::forward<Args>(args)...);
+ value_type &&val = value_type(boost::interprocess::forward<Args>(args)...);
       insert_commit_data data;
       priv_insert_equal_prepare(hint, val, data);
       return priv_insert_commit(data, boost::interprocess::move<value_type>(val));

Modified: branches/release/boost/interprocess/containers/container/stable_vector.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/stable_vector.hpp (original)
+++ branches/release/boost/interprocess/containers/container/stable_vector.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -736,7 +736,7 @@
    {
       typedef emplace_functor<node_type_t, Args...> EmplaceFunctor;
       typedef emplace_iterator<node_type_t, EmplaceFunctor> EmplaceIterator;
- EmplaceFunctor ef(boost::interprocess::forward<Args>(args)...);
+ EmplaceFunctor &&ef = EmplaceFunctor(boost::interprocess::forward<Args>(args)...);
       this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
    }
 
@@ -756,7 +756,7 @@
       size_type pos_n = position - cbegin();
       typedef emplace_functor<node_type_t, Args...> EmplaceFunctor;
       typedef emplace_iterator<node_type_t, EmplaceFunctor> EmplaceIterator;
- EmplaceFunctor ef(boost::interprocess::forward<Args>(args)...);
+ EmplaceFunctor &&ef = EmplaceFunctor(boost::interprocess::forward<Args>(args)...);
       this->insert(position, EmplaceIterator(ef), EmplaceIterator());
       return iterator(this->begin() + pos_n);
    }

Modified: branches/release/boost/interprocess/containers/container/vector.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/container/vector.hpp (original)
+++ branches/release/boost/interprocess/containers/container/vector.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -947,8 +947,8 @@
          ++this->members_.m_size;
       }
       else{
- containers_detail::advanced_insert_aux_emplace<T, T*, Args...> proxy
- (boost::interprocess::forward<Args>(args)...);
+ typedef containers_detail::advanced_insert_aux_emplace<T, T*, Args...> type;
+ type &&proxy = type(boost::interprocess::forward<Args>(args)...);
          priv_range_insert(back_pos, 1, proxy);
       }
    }
@@ -967,8 +967,8 @@
    {
       //Just call more general insert(pos, size, value) and return iterator
       size_type pos_n = position - cbegin();
- containers_detail::advanced_insert_aux_emplace<T, T*, Args...> proxy
- (boost::interprocess::forward<Args>(args)...);
+ typedef containers_detail::advanced_insert_aux_emplace<T, T*, Args...> type;
+ type &&proxy = type(boost::interprocess::forward<Args>(args)...);
       priv_range_insert(position.get_ptr(), 1, proxy);
       return iterator(this->members_.m_start + pos_n);
    }

Modified: branches/release/boost/interprocess/detail/named_proxy.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/named_proxy.hpp (original)
+++ branches/release/boost/interprocess/detail/named_proxy.hpp 2009-10-16 10:54:24 EDT (Fri, 16 Oct 2009)
@@ -120,7 +120,7 @@
    template<class ...Args>
    T *operator()(Args &&...args) const
    {
- CtorNArg<T, is_iterator, Args...> ctor_obj(boost::interprocess::forward<Args>(args)...);
+ CtorNArg<T, is_iterator, Args...> &&ctor_obj = CtorNArg<T, is_iterator, Args...>(boost::interprocess::forward<Args>(args)...);
       return mp_mngr->template
          generic_construct<T>(mp_name, m_num, m_find, m_dothrow, ctor_obj);
    }


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