Commit f271b536 by Paolo Carlini Committed by Paolo Carlini

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
parent e1935569
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> 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/41792 PR libstdc++/41792
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <bits/stringfwd.h> #include <bits/stringfwd.h>
#include <tr1/functional_hash.h> #include <tr1/functional_hash.h>
#include <ext/type_traits.h> #include <ext/type_traits.h>
#include <bits/move.h> // for std::__addressof
namespace std namespace std
{ {
...@@ -452,7 +453,8 @@ namespace tr1 ...@@ -452,7 +453,8 @@ namespace tr1
typedef _Tp type; typedef _Tp type;
explicit explicit
reference_wrapper(_Tp& __indata): _M_data(&__indata) reference_wrapper(_Tp& __indata)
: _M_data(std::__addressof(__indata))
{ } { }
reference_wrapper(const reference_wrapper<_Tp>& __inref): reference_wrapper(const reference_wrapper<_Tp>& __inref):
......
...@@ -136,7 +136,7 @@ namespace __detail ...@@ -136,7 +136,7 @@ namespace __detail
pointer pointer
operator->() const operator->() const
{ return &this->_M_cur->_M_v; } { return std::__addressof(this->_M_cur->_M_v); }
_Node_iterator& _Node_iterator&
operator++() operator++()
...@@ -181,7 +181,7 @@ namespace __detail ...@@ -181,7 +181,7 @@ namespace __detail
pointer pointer
operator->() const operator->() const
{ return &this->_M_cur->_M_v; } { return std::__addressof(this->_M_cur->_M_v); }
_Node_const_iterator& _Node_const_iterator&
operator++() operator++()
...@@ -281,7 +281,7 @@ namespace __detail ...@@ -281,7 +281,7 @@ namespace __detail
pointer pointer
operator->() const operator->() const
{ return &this->_M_cur_node->_M_v; } { return std::__addressof(this->_M_cur_node->_M_v); }
_Hashtable_iterator& _Hashtable_iterator&
operator++() operator++()
...@@ -331,7 +331,7 @@ namespace __detail ...@@ -331,7 +331,7 @@ namespace __detail
pointer pointer
operator->() const operator->() const
{ return &this->_M_cur_node->_M_v; } { return std::__addressof(this->_M_cur_node->_M_v); }
_Hashtable_const_iterator& _Hashtable_const_iterator&
operator++() operator++()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment