|
Boost-Commit : |
From: igaztanaga_at_[hidden]
Date: 2008-06-21 13:20:03
Author: igaztanaga
Date: 2008-06-21 13:20:02 EDT (Sat, 21 Jun 2008)
New Revision: 46581
URL: http://svn.boost.org/trac/boost/changeset/46581
Log:
gcc 4.3 fixes for normal and -std=c++0x modes
Text files modified:
trunk/boost/interprocess/containers/detail/tree.hpp | 9 ++++-----
trunk/boost/interprocess/containers/vector.hpp | 10 ++++++++--
trunk/boost/interprocess/detail/algorithms.hpp | 9 +++++++++
trunk/boost/interprocess/detail/workaround.hpp | 7 +++++--
4 files changed, 26 insertions(+), 9 deletions(-)
Modified: trunk/boost/interprocess/containers/detail/tree.hpp
==============================================================================
--- trunk/boost/interprocess/containers/detail/tree.hpp (original)
+++ trunk/boost/interprocess/containers/detail/tree.hpp 2008-06-21 13:20:02 EDT (Sat, 21 Jun 2008)
@@ -130,7 +130,7 @@
{ m_data = v; }
public:
- #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ #if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE)
template<class Convertible>
static void construct(node_type *ptr, const Convertible &value)
@@ -149,7 +149,7 @@
new((void*)ptr) hack_node_t(value);
}
- #else
+ #elif !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
template<class Convertible>
static void construct(node_type *ptr, Convertible &&value)
@@ -167,19 +167,18 @@
new((void*)ptr) hack_node_t(value);
}
-
#endif
};
}//namespace detail {
-
+#if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE) || !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
template<class T, class VoidPointer>
struct has_own_construct_from_it
< boost::interprocess::detail::rbtree_node<T, VoidPointer> >
{
static const bool value = true;
};
-
+#endif
namespace detail {
template<class A, class ValueCompare>
Modified: trunk/boost/interprocess/containers/vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/vector.hpp (original)
+++ trunk/boost/interprocess/containers/vector.hpp 2008-06-21 13:20:02 EDT (Sat, 21 Jun 2008)
@@ -434,7 +434,10 @@
//This is the optimized move iterator for copy constructors
//so that std::copy and similar can use memcpy
typedef typename detail::if_c
- <base_t::trivial_copy || !is_movable<value_type>::value
+ <base_t::trivial_copy
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ || !is_movable<value_type>::value
+ #endif
,T*
,detail::move_iterator<T*>
>::type copy_move_it;
@@ -442,7 +445,10 @@
//This is the optimized move iterator for assignments
//so that std::uninitialized_copy and similar can use memcpy
typedef typename detail::if_c
- <base_t::trivial_assign || !is_movable<value_type>::value
+ <base_t::trivial_assign
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ || !is_movable<value_type>::value
+ #endif
,T*
,detail::move_iterator<T*>
>::type assign_move_it;
Modified: trunk/boost/interprocess/detail/algorithms.hpp
==============================================================================
--- trunk/boost/interprocess/detail/algorithms.hpp (original)
+++ trunk/boost/interprocess/detail/algorithms.hpp 2008-06-21 13:20:02 EDT (Sat, 21 Jun 2008)
@@ -30,6 +30,8 @@
namespace boost {
namespace interprocess {
+#if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE) || !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
+
template<class T>
struct has_own_construct_from_it
{
@@ -59,12 +61,19 @@
detail::construct_in_place_impl(dest, source, boolean_t());
}
+#else
+template<class T, class InpIt>
+inline void construct_in_place(T* dest, InpIt source)
+{ new((void*)dest)T(*source); }
+#endif
+
template<class T, class U, class D>
inline void construct_in_place(T *dest, default_construct_iterator<U, D>)
{
new((void*)dest)T();
}
+
template<class InIt, class OutIt>
struct optimize_assign
{
Modified: trunk/boost/interprocess/detail/workaround.hpp
==============================================================================
--- trunk/boost/interprocess/detail/workaround.hpp (original)
+++ trunk/boost/interprocess/detail/workaround.hpp 2008-06-21 13:20:02 EDT (Sat, 21 Jun 2008)
@@ -107,8 +107,11 @@
// defined by some very early development versions of GCC 4.3; we will
// remove this part of the check in the near future.
# if defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_INTERPROCESS_RVALUE_REFERENCE
-# define BOOST_INTERPROCESS_VARIADIC_TEMPLATES
+# define BOOST_INTERPROCESS_RVALUE_REFERENCE
+# define BOOST_INTERPROCESS_VARIADIC_TEMPLATES
+# if defined(__GLIBCPP__) || defined(__GLIBCXX__)
+# define BOOST_INTERPROCESS_RVALUE_PAIR
+# endif
# endif
#endif
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