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>
PR libstdc++/41792
......
......@@ -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):
......
......@@ -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++()
......
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