OSDN Git Service

2010-05-21 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 May 2010 12:59:30 +0000 (12:59 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 May 2010 12:59:30 +0000 (12:59 +0000)
* include/tr1/functional: Use std::__addressof.
* include/tr1/hashtable_policy.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159661 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/tr1/functional
libstdc++-v3/include/tr1/hashtable_policy.h

index fb99088..1b4527a 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/tr1/functional: Use std::__addressof.
+       * include/tr1/hashtable_policy.h: Likewise.
+
 2010-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR libstdc++/41792
index 7bc0d5e..ae080bb 100644 (file)
@@ -42,6 +42,7 @@
 #include <bits/stringfwd.h>
 #include <tr1/functional_hash.h>
 #include <ext/type_traits.h>
+#include <bits/move.h> // for std::__addressof
 
 namespace std
 {
@@ -452,7 +453,8 @@ namespace tr1
       typedef _Tp type;
 
       explicit
-      reference_wrapper(_Tp& __indata): _M_data(&__indata)
+      reference_wrapper(_Tp& __indata)
+      : _M_data(std::__addressof(__indata))
       { }
 
       reference_wrapper(const reference_wrapper<_Tp>& __inref):
index 2a0e0ed..514fdb0 100644 (file)
@@ -136,7 +136,7 @@ namespace __detail
   
       pointer
       operator->() const
-      { return &this->_M_cur->_M_v; }
+      { return std::__addressof(this->_M_cur->_M_v); }
 
       _Node_iterator&
       operator++()
@@ -181,7 +181,7 @@ namespace __detail
   
       pointer
       operator->() const
-      { return &this->_M_cur->_M_v; }
+      { return std::__addressof(this->_M_cur->_M_v); }
 
       _Node_const_iterator&
       operator++()
@@ -281,7 +281,7 @@ namespace __detail
   
       pointer
       operator->() const
-      { return &this->_M_cur_node->_M_v; }
+      { return std::__addressof(this->_M_cur_node->_M_v); }
 
       _Hashtable_iterator&
       operator++()
@@ -331,7 +331,7 @@ namespace __detail
   
       pointer
       operator->() const
-      { return &this->_M_cur_node->_M_v; }
+      { return std::__addressof(this->_M_cur_node->_M_v); }
 
       _Hashtable_const_iterator&
       operator++()