Define std::__to_address helper
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Sep 2017 07:27:40 +0000 (08:27 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 Sep 2017 07:27:40 +0000 (08:27 +0100)
commit2af96386a67a2224abc74e7c2144747240ac4ad5
treeffd369339fc1045d90b7310dfd7bb7aea1173085
parentbc03ac3218260524ca6bdb70591a1590c518c762
Define std::__to_address helper

* include/bits/allocated_ptr.h (__allocated_ptr::get): Use
__to_address.
(__allocated_ptr::_S_raw_ptr): Remove.
* include/bits/forward_list.h (_Fwd_list_base::_M_get_node): Use
__to_address.
* include/bits/hashtable_policy.h (_Hashtable_alloc): Likewise.
* include/bits/ptr_traits.h (__to_address): Define new function
template.
* include/bits/shared_ptr_base.h (__shared_ptr): Use __to_address.
(__shared_ptr::_S_raw_ptr): Remove.
* include/bits/stl_vector.h [__cplusplus >= 201103L]
(vector::_M_data_ptr): Use __to_address.
[__cplusplus < 201103L] (vector::_M_data_ptr): Don't dereference
possibly invalid pointers.
* include/ext/alloc_traits.h (__alloc_traits::construct)
(__alloc_traits::destroy): Use __to_address.

From-SVN: r252055
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/allocated_ptr.h
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/bits/ptr_traits.h
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/ext/alloc_traits.h