aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-12-12 19:26:42 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2012-12-12 19:26:42 +0800
commit1e4edc8addf7fc21d821e64cc81d85315561bcd9 (patch)
treeaf973be96467882e09f419050897ce3081121673 /gcc-4.4.3
parent7609f724df8ca390935f63243fa72e1de39d00c6 (diff)
downloadtoolchain_gcc-1e4edc8addf7fc21d821e64cc81d85315561bcd9.tar.gz
toolchain_gcc-1e4edc8addf7fc21d821e64cc81d85315561bcd9.tar.bz2
toolchain_gcc-1e4edc8addf7fc21d821e64cc81d85315561bcd9.zip
Patch GCC libstdc++ 4.4.3/4.6/4.7 to work with Clang in C++11
See http://clang.llvm.org/cxx_status.html http://code.google.com/p/android/issues/detail?id=39600 https://android-review.googlesource.com/#/c/47836/ Change-Id: I1e625592dcc66fa952e0965bf86e8255cac6ca72
Diffstat (limited to 'gcc-4.4.3')
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/forward_list.h2
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/move.h24
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/shared_ptr.h22
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_bvector.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_deque.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_iterator.h2
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_list.h32
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_map.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_multimap.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_multiset.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_pair.h27
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_queue.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_set.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_stack.h2
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_tree.h8
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/stl_vector.h4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/bits/unique_ptr.h16
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/ext/algorithm4
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/ext/vstring.h6
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/std/tuple14
-rw-r--r--gcc-4.4.3/libstdc++-v3/include/tr1_impl/hashtable8
21 files changed, 94 insertions, 105 deletions
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/forward_list.h b/gcc-4.4.3/libstdc++-v3/include/bits/forward_list.h
index d49eb4a06..8ec2a5d93 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/forward_list.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/forward_list.h
@@ -983,7 +983,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* function.
*/
void
- swap(forward_list&& __list)
+ swap(forward_list& __list)
{ _Node_base::swap(this->_M_impl._M_head, __list._M_impl._M_head); }
/**
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/move.h b/gcc-4.4.3/libstdc++-v3/include/bits/move.h
index ef86c4d12..b82b263a6 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/move.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/move.h
@@ -48,13 +48,35 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _Tp>
inline _Tp&&
- forward(typename std::identity<_Tp>::type&& __t)
+ forward(typename std::remove_reference<_Tp>::type& __t)
+#ifdef __clang__
+ { return static_cast<_Tp&&>(__t); }
+#else
{ return __t; }
+#endif
+
+ template<typename _Tp>
+ inline _Tp&&
+ forward(typename std::remove_reference<_Tp>::type&& __t)
+ {
+#ifdef __clang__
+ static_assert(!std::is_lvalue_reference<_Tp>::value,
+ "Can't instantiate this forward() with an"
+ " lvalue reference type.");
+ return static_cast<_Tp&&>(__t);
+#else
+ return __t;
+#endif
+ }
template<typename _Tp>
inline typename std::remove_reference<_Tp>::type&&
move(_Tp&& __t)
+#ifdef __clang__
+ { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
+#else
{ return __t; }
+#endif
_GLIBCXX_END_NAMESPACE
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/shared_ptr.h b/gcc-4.4.3/libstdc++-v3/include/bits/shared_ptr.h
index a378ae01d..e8cd8ea99 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/shared_ptr.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/shared_ptr.h
@@ -833,7 +833,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return _M_refcount._M_get_use_count(); }
void
- swap(__shared_ptr<_Tp, _Lp>&& __other) // never throws
+ swap(__shared_ptr<_Tp, _Lp>& __other) // never throws
{
std::swap(_M_ptr, __other._M_ptr);
_M_refcount._M_swap(__other._M_refcount);
@@ -943,16 +943,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b)
{ __a.swap(__b); }
- template<typename _Tp, _Lock_policy _Lp>
- inline void
- swap(__shared_ptr<_Tp, _Lp>&& __a, __shared_ptr<_Tp, _Lp>& __b)
- { __a.swap(__b); }
-
- template<typename _Tp, _Lock_policy _Lp>
- inline void
- swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>&& __b)
- { __a.swap(__b); }
-
// 2.2.3.9 shared_ptr casts
/** @warning The seemingly equivalent
* <code>shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))</code>
@@ -1372,16 +1362,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b)
{ __a.swap(__b); }
- template<typename _Tp>
- inline void
- swap(shared_ptr<_Tp>&& __a, shared_ptr<_Tp>& __b)
- { __a.swap(__b); }
-
- template<typename _Tp>
- inline void
- swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>&& __b)
- { __a.swap(__b); }
-
// 20.8.13.2.10 shared_ptr casts.
template<typename _Tp, typename _Tp1>
inline shared_ptr<_Tp>
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_bvector.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_bvector.h
index 0e60b7f1b..87dbb0b3f 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_bvector.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_bvector.h
@@ -743,11 +743,7 @@ template<typename _Alloc>
}
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(vector&& __x)
-#else
swap(vector& __x)
-#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_deque.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_deque.h
index 1c20e275f..932ad7d2d 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_deque.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_deque.h
@@ -1395,11 +1395,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* std::swap(d1,d2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(deque&& __x)
-#else
swap(deque& __x)
-#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_iterator.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_iterator.h
index 129552f37..645fd0f47 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_iterator.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_iterator.h
@@ -913,7 +913,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
reference
operator*() const
- { return *_M_current; }
+ { return std::move(*_M_current); }
pointer
operator->() const
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_list.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_list.h
index 66a50b81e..8206c8446 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_list.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_list.h
@@ -1106,11 +1106,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(list&& __x)
-#else
swap(list& __x)
-#endif
{
_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node);
@@ -1160,6 +1156,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ splice(iterator __position, list& __x)
+ { splice(__position, std::move(__x)); }
+#endif
+
/**
* @brief Insert element from another %list.
* @param position Iterator referencing the element to insert before.
@@ -1187,6 +1189,12 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
this->_M_transfer(__position, __i, __j);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ splice(iterator __position, list& __x, iterator __i)
+ { splice(__position, std::move(__x), __i); }
+#endif
+
/**
* @brief Insert range from another %list.
* @param position Iterator referencing the element to insert before.
@@ -1217,6 +1225,13 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
}
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ void
+ splice(iterator __position, list& __x, iterator __first,
+ iterator __last)
+ { splice(__position, std::move(__x), __first, __last); }
+#endif
+
/**
* @brief Remove all elements equal to value.
* @param value The value to remove.
@@ -1287,6 +1302,10 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
void
#ifdef __GXX_EXPERIMENTAL_CXX0X__
merge(list&& __x);
+
+ void
+ merge(list& __x)
+ { merge(std::move(__x)); }
#else
merge(list& __x);
#endif
@@ -1307,6 +1326,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
void
#ifdef __GXX_EXPERIMENTAL_CXX0X__
merge(list&&, _StrictWeakOrdering);
+
+ template<typename _StrictWeakOrdering>
+ void
+ merge(list& __l, _StrictWeakOrdering __comp)
+ { merge(std::move(__l), __comp); }
#else
merge(list&, _StrictWeakOrdering);
#endif
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_map.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_map.h
index 90e5239dd..c9f3e7146 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_map.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_map.h
@@ -608,11 +608,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* that std::swap(m1,m2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(map&& __x)
-#else
swap(map& __x)
-#endif
{ _M_t.swap(__x._M_t); }
/**
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_multimap.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_multimap.h
index 484537cf2..f2be4772c 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_multimap.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_multimap.h
@@ -544,11 +544,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* std::swap(m1,m2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(multimap&& __x)
-#else
swap(multimap& __x)
-#endif
{ _M_t.swap(__x._M_t); }
/**
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_multiset.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_multiset.h
index b5c710f31..9f89573ff 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_multiset.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_multiset.h
@@ -376,11 +376,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* std::swap(s1,s2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(multiset&& __x)
-#else
swap(multiset& __x)
-#endif
{ _M_t.swap(__x._M_t); }
// insert/erase
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_pair.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_pair.h
index fd395adbd..f56fec19a 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_pair.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_pair.h
@@ -84,10 +84,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
: first(__a), second(__b) { }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- template<class _U1, class _U2>
+ template<class _U1, class = typename
+ std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
+ pair(_U1&& __x, const _T2& __y)
+ : first(std::forward<_U1>(__x)), second(__y) { }
+
+ template<class _U2, class = typename
+ std::enable_if<std::is_convertible<_U2, _T2>::value>::type>
+ pair(const _T1& __x, _U2&& __y)
+ : first(__x), second(std::forward<_U2>(__y)) { }
+
+ template<class _U1, class _U2, class = typename
+ std::enable_if<std::is_convertible<_U1, _T1>::value
+ && std::is_convertible<_U2, _T2>::value>::type>
pair(_U1&& __x, _U2&& __y)
- : first(std::forward<_U1>(__x)),
- second(std::forward<_U2>(__y)) { }
+ : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
pair(pair&& __p)
: first(std::move(__p.first)),
@@ -107,11 +118,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
second(std::move(__p.second)) { }
// http://gcc.gnu.org/ml/libstdc++/2007-08/msg00052.html
+
+#if 0
+ // This constructor is incompatible with libstdc++-4.6, and it
+ // interferes with passing NULL pointers to the 2-argument
+ // constructors, so we disable it. map::emplace isn't
+ // implemented in libstdc++-4.4 anyway, and that's what this
+ // constructor was here for.
template<class _U1, class _Arg0, class... _Args>
pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
: first(std::forward<_U1>(__x)),
second(std::forward<_Arg0>(__arg0),
std::forward<_Args>(__args)...) { }
+#endif
pair&
operator=(pair&& __p)
@@ -131,7 +150,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
void
- swap(pair&& __p)
+ swap(pair& __p)
{
using std::swap;
swap(first, __p.first);
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_queue.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_queue.h
index 7479469d1..0ebe2578d 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_queue.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_queue.h
@@ -249,7 +249,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
- swap(queue&& __q)
+ swap(queue& __q)
{ c.swap(__q.c); }
#endif
};
@@ -550,7 +550,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
- swap(priority_queue&& __pq)
+ swap(priority_queue& __pq)
{
using std::swap;
c.swap(__pq.c);
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_set.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_set.h
index f06fe0336..d74640753 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_set.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_set.h
@@ -383,11 +383,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* std::swap(s1,s2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(set&& __x)
-#else
swap(set& __x)
-#endif
{ _M_t.swap(__x._M_t); }
// insert/erase
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_stack.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_stack.h
index da301d474..87aa718fa 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_stack.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_stack.h
@@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void
- swap(stack&& __s)
+ swap(stack& __s)
{ c.swap(__s.c); }
#endif
};
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_tree.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_tree.h
index e2cc1518d..7f38c55d5 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_tree.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_tree.h
@@ -715,11 +715,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{ return _M_get_Node_allocator().max_size(); }
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(_Rb_tree&& __t);
-#else
swap(_Rb_tree& __t);
-#endif
// Insert/erase.
pair<iterator, bool>
@@ -1144,11 +1140,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
typename _Compare, typename _Alloc>
void
_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __t)
-#else
swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t)
-#endif
{
if (_M_root() == 0)
{
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/stl_vector.h b/gcc-4.4.3/libstdc++-v3/include/bits/stl_vector.h
index 6871bb072..363c630b2 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/stl_vector.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/stl_vector.h
@@ -939,11 +939,7 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
* std::swap(v1,v2) will feed to this function.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(vector&& __x)
-#else
swap(vector& __x)
-#endif
{
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
diff --git a/gcc-4.4.3/libstdc++-v3/include/bits/unique_ptr.h b/gcc-4.4.3/libstdc++-v3/include/bits/unique_ptr.h
index b686d11fd..c1185f242 100644
--- a/gcc-4.4.3/libstdc++-v3/include/bits/unique_ptr.h
+++ b/gcc-4.4.3/libstdc++-v3/include/bits/unique_ptr.h
@@ -204,7 +204,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}
void
- swap(unique_ptr&& __u)
+ swap(unique_ptr& __u)
{
using std::swap;
swap(_M_t, __u._M_t);
@@ -350,7 +350,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
void reset(_Up) = delete;
void
- swap(unique_ptr&& __u)
+ swap(unique_ptr& __u)
{
using std::swap;
swap(_M_t, __u._M_t);
@@ -389,18 +389,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
unique_ptr<_Tp, _Tp_Deleter>& __y)
{ __x.swap(__y); }
- template<typename _Tp, typename _Tp_Deleter>
- inline void
- swap(unique_ptr<_Tp, _Tp_Deleter>&& __x,
- unique_ptr<_Tp, _Tp_Deleter>& __y)
- { __x.swap(__y); }
-
- template<typename _Tp, typename _Tp_Deleter>
- inline void
- swap(unique_ptr<_Tp, _Tp_Deleter>& __x,
- unique_ptr<_Tp, _Tp_Deleter>&& __y)
- { __x.swap(__y); }
-
template<typename _Tp, typename _Tp_Deleter,
typename _Up, typename _Up_Deleter>
inline bool
diff --git a/gcc-4.4.3/libstdc++-v3/include/ext/algorithm b/gcc-4.4.3/libstdc++-v3/include/ext/algorithm
index 3337d6c07..4cd1dae80 100644
--- a/gcc-4.4.3/libstdc++-v3/include/ext/algorithm
+++ b/gcc-4.4.3/libstdc++-v3/include/ext/algorithm
@@ -423,6 +423,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__out_last - __out_first);
}
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ using std::is_heap;
+#else
/**
* This is an SGI extension.
* @ingroup SGIextensions
@@ -462,6 +465,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return std::__is_heap(__first, __comp, __last - __first);
}
+#endif
// is_sorted, a predicated testing whether a range is sorted in
// nondescending order. This is an extension, not part of the C++
diff --git a/gcc-4.4.3/libstdc++-v3/include/ext/vstring.h b/gcc-4.4.3/libstdc++-v3/include/ext/vstring.h
index 6377ca57d..a259d23fa 100644
--- a/gcc-4.4.3/libstdc++-v3/include/ext/vstring.h
+++ b/gcc-4.4.3/libstdc++-v3/include/ext/vstring.h
@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* string.
*/
__versa_string(__versa_string&& __str)
- : __vstring_base(std::forward<__vstring_base>(__str)) { }
+ : __vstring_base(std::move(__str)) { }
/**
* @brief Construct string from an initializer list.
@@ -1454,11 +1454,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* constant time.
*/
void
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- swap(__versa_string&& __s)
-#else
swap(__versa_string& __s)
-#endif
{ this->_M_swap(__s); }
// String operations:
diff --git a/gcc-4.4.3/libstdc++-v3/include/std/tuple b/gcc-4.4.3/libstdc++-v3/include/std/tuple
index c5dbe6bcc..29c39744c 100644
--- a/gcc-4.4.3/libstdc++-v3/include/std/tuple
+++ b/gcc-4.4.3/libstdc++-v3/include/std/tuple
@@ -77,7 +77,7 @@ namespace std
_Head& _M_head() { return *this; }
const _Head& _M_head() const { return *this; }
- void _M_swap_impl(_Head&&) { /* no-op */ }
+ void _M_swap_impl(_Head&) { /* no-op */ }
};
template<std::size_t _Idx, typename _Head>
@@ -97,7 +97,7 @@ namespace std
const _Head& _M_head() const { return _M_head_impl; }
void
- _M_swap_impl(_Head&& __h)
+ _M_swap_impl(_Head& __h)
{
using std::swap;
swap(__h, _M_head_impl);
@@ -125,7 +125,7 @@ namespace std
struct _Tuple_impl<_Idx>
{
protected:
- void _M_swap_impl(_Tuple_impl&&) { /* no-op */ }
+ void _M_swap_impl(_Tuple_impl&) { /* no-op */ }
};
/**
@@ -214,7 +214,7 @@ namespace std
protected:
void
- _M_swap_impl(_Tuple_impl&& __in)
+ _M_swap_impl(_Tuple_impl& __in)
{
_Base::_M_swap_impl(__in._M_head());
_Inherited::_M_swap_impl(__in._M_tail());
@@ -292,7 +292,7 @@ namespace std
}
void
- swap(tuple&& __in)
+ swap(tuple& __in)
{ _Inherited::_M_swap_impl(__in); }
};
@@ -301,7 +301,7 @@ namespace std
class tuple<>
{
public:
- void swap(tuple&&) { /* no-op */ }
+ void swap(tuple&) { /* no-op */ }
};
/// tuple (2-element), with construction and assignment from a pair.
@@ -394,7 +394,7 @@ namespace std
}
void
- swap(tuple&& __in)
+ swap(tuple& __in)
{
using std::swap;
swap(this->_M_head(), __in._M_head());
diff --git a/gcc-4.4.3/libstdc++-v3/include/tr1_impl/hashtable b/gcc-4.4.3/libstdc++-v3/include/tr1_impl/hashtable
index 7c9098309..bce550ff1 100644
--- a/gcc-4.4.3/libstdc++-v3/include/tr1_impl/hashtable
+++ b/gcc-4.4.3/libstdc++-v3/include/tr1_impl/hashtable
@@ -225,11 +225,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
~_Hashtable();
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
- void swap(_Hashtable&&);
-#else
void swap(_Hashtable&);
-#endif
// Basic container operations
iterator
@@ -732,11 +728,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
void
_Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>::
-#ifdef _GLIBCXX_INCLUDE_AS_CXX0X
- swap(_Hashtable&& __x)
-#else
swap(_Hashtable& __x)
-#endif
{
// The only base class with member variables is hash_code_base. We
// define _Hash_code_base::_M_swap because different specializations