diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-05-21 12:59:30 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-05-21 12:59:30 +0000 |
commit | f271b5369a502565dd8ea7893607738d20dd6da0 (patch) | |
tree | 7b65f9f720889659cc4af7a5a992d86caad1afd9 /libstdc++-v3 | |
parent | e193556973554307f323306faefe9b4aaaea6f8d (diff) | |
download | gcc-f271b5369a502565dd8ea7893607738d20dd6da0.zip gcc-f271b5369a502565dd8ea7893607738d20dd6da0.tar.gz gcc-f271b5369a502565dd8ea7893607738d20dd6da0.tar.bz2 |
functional: Use std::__addressof.
2010-05-21 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1/functional: Use std::__addressof.
* include/tr1/hashtable_policy.h: Likewise.
From-SVN: r159661
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 fb99088..1b4527a 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 7bc0d5e..ae080bb 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 2a0e0ed..514fdb0 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++() |