Define std::__to_address helper
commit0fdf8c8d1f9cb7fe585e2c4606d1889ef5dc50f6
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Sep 2017 07:27:40 +0000 (13 07:27 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Sep 2017 07:27:40 +0000 (13 07:27 +0000)
treeffd369339fc1045d90b7310dfd7bb7aea1173085
parent77e98d949219e699847b12bf7496f0d357ca6286
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252055 138bc75d-0d04-0410-961f-82ee72b054a4
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