summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/tr1
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 12:59:30 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-21 12:59:30 +0000
commite581d3acd2eca77cea828feb6928c6870d5d397e (patch)
tree7b65f9f720889659cc4af7a5a992d86caad1afd9 /libstdc++-v3/include/tr1
parent83e170dfd44c597e8432d9cbb798819a4bfbb287 (diff)
downloadgcc-e581d3acd2eca77cea828feb6928c6870d5d397e.tar.gz
2010-05-21 Paolo Carlini <paolo.carlini@oracle.com>
* 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
Diffstat (limited to 'libstdc++-v3/include/tr1')
-rw-r--r--libstdc++-v3/include/tr1/functional4
-rw-r--r--libstdc++-v3/include/tr1/hashtable_policy.h8
2 files changed, 7 insertions, 5 deletions
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional
index 7bc0d5e5f75..ae080bb5df9 100644
--- a/libstdc++-v3/include/tr1/functional
+++ b/libstdc++-v3/include/tr1/functional
@@ -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):
diff --git a/libstdc++-v3/include/tr1/hashtable_policy.h b/libstdc++-v3/include/tr1/hashtable_policy.h
index 2a0e0ed4e1a..514fdb0983e 100644
--- a/libstdc++-v3/include/tr1/hashtable_policy.h
+++ b/libstdc++-v3/include/tr1/hashtable_policy.h
@@ -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++()