diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-21 12:59:30 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-21 12:59:30 +0000 |
commit | e581d3acd2eca77cea828feb6928c6870d5d397e (patch) | |
tree | 7b65f9f720889659cc4af7a5a992d86caad1afd9 /libstdc++-v3 | |
parent | 83e170dfd44c597e8432d9cbb798819a4bfbb287 (diff) | |
download | gcc-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')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/functional | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/hashtable_policy.h | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fb99088a2b4..1b4527a0d5e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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 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++() |