From 6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad Mon Sep 17 00:00:00 2001 From: hjl Date: Wed, 2 Jun 2010 21:47:37 +0000 Subject: Merge trunk at revision 160193 into branch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@160194 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/bits/stl_tree.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'libstdc++-v3/include/bits/stl_tree.h') diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index d37dc57246e..58c63cf4376 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -1,6 +1,7 @@ // RB tree implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +// 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -176,7 +177,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) pointer operator->() const - { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } _Self& operator++() @@ -251,7 +253,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) pointer operator->() const - { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } _Self& operator++() @@ -368,7 +371,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { _Link_type __tmp = _M_get_node(); __try - { get_allocator().construct(&__tmp->_M_value_field, __x); } + { get_allocator().construct + (std::__addressof(__tmp->_M_value_field), __x); } __catch(...) { _M_put_node(__tmp); @@ -380,7 +384,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) void _M_destroy_node(_Link_type __p) { - get_allocator().destroy(&__p->_M_value_field); + get_allocator().destroy(std::__addressof(__p->_M_value_field)); _M_put_node(__p); } #else -- cgit v1.2.1