Here's an update for the patch recently commited to /www.
Jeffrey Yasskin asked me to mail it here so he can take a closer look at
it later.

-- 
Mierswa, Daniel

If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
               --- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
>From b2a204ab6f70914477c3380688240762e207a9a9 Mon Sep 17 00:00:00 2001
From: Daniel Mierswa <[email protected]>
Date: Wed, 30 Mar 2011 23:13:50 +0200
Subject: [PATCH] update libstdc++4.4 patch for unique and shared pointers

---
 www/libstdc++4.4-clang0x.patch |   86 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/www/libstdc++4.4-clang0x.patch b/www/libstdc++4.4-clang0x.patch
index 8b9916d..983352f 100644
--- a/www/libstdc++4.4-clang0x.patch
+++ b/www/libstdc++4.4-clang0x.patch
@@ -268,6 +268,52 @@ diff -ur a/bits/stl_set.h b/bits/stl_set.h
        { _M_t.swap(__x._M_t); }
  
        // insert/erase
+diff -ur a/bits/shared_ptr.h b/bits/shared_ptr.h
+--- a/bits/shared_ptr.h        2011-02-01 21:03:02.000000000 +0100
++++ b/bits/shared_ptr.h        2011-03-30 22:59:05.000000000 +0200
+@@ -833,7 +833,7 @@
+       { 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 @@
+     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 @@
+     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 -ur a/bits/stl_tree.h b/bits/stl_tree.h
 --- a/bits/stl_tree.h  2011-03-15 14:49:05.000000000 -0700
 +++ b/bits/stl_tree.h  2011-03-29 10:33:39.000000000 -0700
@@ -295,6 +341,46 @@ diff -ur a/bits/stl_tree.h b/bits/stl_tree.h
      {
        if (_M_root() == 0)
        {
+diff -ur a/bits/unique_ptr.h b/bits/unique_ptr.h
+--- a/bits/unique_ptr.h        2011-02-01 21:03:02.000000000 +0100
++++ b/bits/unique_ptr.h        2011-03-30 23:04:19.000000000 +0200
+@@ -204,7 +204,7 @@
+       }
+ 
+       void
+-      swap(unique_ptr&& __u)
++      swap(unique_ptr& __u)
+       {
+       using std::swap;
+       swap(_M_t, __u._M_t);
+@@ -350,7 +350,7 @@
+         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 @@
+        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 -ur a/bits/stl_vector.h b/bits/stl_vector.h
 --- a/bits/stl_vector.h        2011-03-15 14:49:05.000000000 -0700
 +++ b/bits/stl_vector.h        2011-03-29 10:33:39.000000000 -0700
-- 
1.7.4.1

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to