Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78149 - branches/release/boost/container branches/release/boost/container/detail branches/release/boost/interprocess/mem_algo/detail branches/release/libs/move/example trunk/boost/container trunk/boost/container/detail trunk/boost/interprocess/mem_algo/detail trunk/libs/move/example
From: igaztanaga_at_[hidden]
Date: 2012-04-22 18:54:20


Author: igaztanaga
Date: 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
New Revision: 78149
URL: http://svn.boost.org/trac/boost/changeset/78149

Log:
Fixed clang warnings and errors
Text files modified:
   branches/release/boost/container/detail/flat_tree.hpp | 8 ++++----
   branches/release/boost/container/scoped_allocator.hpp | 21 +++++++++++----------
   branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp | 2 +-
   branches/release/libs/move/example/doc_clone_ptr.cpp | 2 ++
   trunk/boost/container/detail/flat_tree.hpp | 8 ++++----
   trunk/boost/container/scoped_allocator.hpp | 21 +++++++++++----------
   trunk/boost/interprocess/mem_algo/detail/mem_algo_common.hpp | 2 +-
   trunk/libs/move/example/doc_clone_ptr.cpp | 2 ++
   8 files changed, 36 insertions(+), 30 deletions(-)

Modified: branches/release/boost/container/detail/flat_tree.hpp
==============================================================================
--- branches/release/boost/container/detail/flat_tree.hpp (original)
+++ branches/release/boost/container/detail/flat_tree.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -386,7 +386,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       std::pair<iterator,bool> ret =
@@ -404,7 +404,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);
@@ -421,7 +421,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       iterator i = this->upper_bound(KeyOfValue()(val));
       i = this->m_data.m_vect.insert(i, boost::move(val));
@@ -435,7 +435,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       this->priv_insert_equal_prepare(hint, val, data);

Modified: branches/release/boost/container/scoped_allocator.hpp
==============================================================================
--- branches/release/boost/container/scoped_allocator.hpp (original)
+++ branches/release/boost/container/scoped_allocator.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -646,24 +646,24 @@
    template <class OuterA2>
    scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args)
       : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
- , inner(args...)
+ , m_inner(args...)
       {}
 
    scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
       : outer_allocator_type(::boost::move(other.outer_allocator()))
- , inner(::boost::move(other.inner_allocator()))
+ , m_inner(::boost::move(other.inner_allocator()))
       {}
 
    template <class OuterA2>
    scoped_allocator_adaptor_base
       (const scoped_allocator_adaptor_base<OuterA2, InnerAllocs...>& other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    template <class OuterA2>
@@ -671,7 +671,7 @@
       (BOOST_RV_REF_BEG scoped_allocator_adaptor_base
          <OuterA2, InnerAllocs...> BOOST_RV_REF_END other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    protected:
@@ -692,22 +692,22 @@
       (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
    {
       outer_allocator_type::operator=(other.outer_allocator());
- inner = other.inner_allocator();
+ m_inner = other.inner_allocator();
       return *this;
    }
 
    scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
    {
       outer_allocator_type::operator=(boost::move(other.outer_allocator()));
- inner = ::boost::move(other.inner_allocator());
+ m_inner = ::boost::move(other.inner_allocator());
       return *this;
    }
 
    inner_allocator_type& inner_allocator()
- { return inner; }
+ { return m_inner; }
 
    inner_allocator_type const& inner_allocator() const
- { return inner; }
+ { return m_inner; }
 
    outer_allocator_type & outer_allocator()
       { return static_cast<outer_allocator_type&>(*this); }
@@ -716,7 +716,7 @@
       { return static_cast<const outer_allocator_type&>(*this); }
 
    private:
- inner_allocator_type inner;
+ inner_allocator_type m_inner;
 };
 
 #else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
@@ -1060,6 +1060,7 @@
       , true BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q)
       #endif
> base_type;
+ typedef typename base_type::internal_type_t internal_type_t;
    /// @endcond
    typedef OuterAlloc outer_allocator_type;
    //! Type: For exposition only

Modified: branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -362,7 +362,7 @@
          return true;
 
       size_type shrunk_user_units =
- ((BlockCtrlUnits - AllocatedCtrlUnits) > preferred_user_units)
+ ((BlockCtrlUnits - AllocatedCtrlUnits) >= preferred_user_units)
          ? (BlockCtrlUnits - AllocatedCtrlUnits)
          : preferred_user_units;
 

Modified: branches/release/libs/move/example/doc_clone_ptr.cpp
==============================================================================
--- branches/release/libs/move/example/doc_clone_ptr.cpp (original)
+++ branches/release/libs/move/example/doc_clone_ptr.cpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -30,6 +30,8 @@
    
    virtual Base *clone() const
    { return new Base(*this); }
+
+ virtual ~Base(){}
 };
 
 class Member

Modified: trunk/boost/container/detail/flat_tree.hpp
==============================================================================
--- trunk/boost/container/detail/flat_tree.hpp (original)
+++ trunk/boost/container/detail/flat_tree.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -386,7 +386,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       std::pair<iterator,bool> ret =
@@ -404,7 +404,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);
@@ -421,7 +421,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       iterator i = this->upper_bound(KeyOfValue()(val));
       i = this->m_data.m_vect.insert(i, boost::move(val));
@@ -435,7 +435,7 @@
       aligned_storage<sizeof(value_type), alignment_of<value_type>::value> v;
       value_type &val = *static_cast<value_type *>(static_cast<void *>(&v));
       stored_allocator_type &a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward(args)... );
+ stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
       scoped_destructor<stored_allocator_type> d(a, &val);
       insert_commit_data data;
       this->priv_insert_equal_prepare(hint, val, data);

Modified: trunk/boost/container/scoped_allocator.hpp
==============================================================================
--- trunk/boost/container/scoped_allocator.hpp (original)
+++ trunk/boost/container/scoped_allocator.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -646,24 +646,24 @@
    template <class OuterA2>
    scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args)
       : outer_allocator_type(::boost::forward<OuterA2>(outerAlloc))
- , inner(args...)
+ , m_inner(args...)
       {}
 
    scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
       : outer_allocator_type(::boost::move(other.outer_allocator()))
- , inner(::boost::move(other.inner_allocator()))
+ , m_inner(::boost::move(other.inner_allocator()))
       {}
 
    template <class OuterA2>
    scoped_allocator_adaptor_base
       (const scoped_allocator_adaptor_base<OuterA2, InnerAllocs...>& other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    template <class OuterA2>
@@ -671,7 +671,7 @@
       (BOOST_RV_REF_BEG scoped_allocator_adaptor_base
          <OuterA2, InnerAllocs...> BOOST_RV_REF_END other)
       : outer_allocator_type(other.outer_allocator())
- , inner(other.inner_allocator())
+ , m_inner(other.inner_allocator())
       {}
 
    protected:
@@ -692,22 +692,22 @@
       (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)
    {
       outer_allocator_type::operator=(other.outer_allocator());
- inner = other.inner_allocator();
+ m_inner = other.inner_allocator();
       return *this;
    }
 
    scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)
    {
       outer_allocator_type::operator=(boost::move(other.outer_allocator()));
- inner = ::boost::move(other.inner_allocator());
+ m_inner = ::boost::move(other.inner_allocator());
       return *this;
    }
 
    inner_allocator_type& inner_allocator()
- { return inner; }
+ { return m_inner; }
 
    inner_allocator_type const& inner_allocator() const
- { return inner; }
+ { return m_inner; }
 
    outer_allocator_type & outer_allocator()
       { return static_cast<outer_allocator_type&>(*this); }
@@ -716,7 +716,7 @@
       { return static_cast<const outer_allocator_type&>(*this); }
 
    private:
- inner_allocator_type inner;
+ inner_allocator_type m_inner;
 };
 
 #else //#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
@@ -1060,6 +1060,7 @@
       , true BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS, Q)
       #endif
> base_type;
+ typedef typename base_type::internal_type_t internal_type_t;
    /// @endcond
    typedef OuterAlloc outer_allocator_type;
    //! Type: For exposition only

Modified: trunk/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
==============================================================================
--- trunk/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (original)
+++ trunk/boost/interprocess/mem_algo/detail/mem_algo_common.hpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -362,7 +362,7 @@
          return true;
 
       size_type shrunk_user_units =
- ((BlockCtrlUnits - AllocatedCtrlUnits) > preferred_user_units)
+ ((BlockCtrlUnits - AllocatedCtrlUnits) >= preferred_user_units)
          ? (BlockCtrlUnits - AllocatedCtrlUnits)
          : preferred_user_units;
 

Modified: trunk/libs/move/example/doc_clone_ptr.cpp
==============================================================================
--- trunk/libs/move/example/doc_clone_ptr.cpp (original)
+++ trunk/libs/move/example/doc_clone_ptr.cpp 2012-04-22 18:54:18 EDT (Sun, 22 Apr 2012)
@@ -30,6 +30,8 @@
    
    virtual Base *clone() const
    { return new Base(*this); }
+
+ virtual ~Base(){}
 };
 
 class Member


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