diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-09-28 15:26:46 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-09-28 20:22:50 +0100 |
commit | 82626be2d633a9802a8b08727ef51c627e37fee5 (patch) | |
tree | 42611665bfec6c2fee6ef6035b7ac92038171fd4 /gcc/gimplify.c | |
parent | b12d6e79899fd27833c53ffc3c973538244f62e1 (diff) | |
download | gcc-82626be2d633a9802a8b08727ef51c627e37fee5.zip gcc-82626be2d633a9802a8b08727ef51c627e37fee5.tar.gz gcc-82626be2d633a9802a8b08727ef51c627e37fee5.tar.bz2 |
libstdc++: Specialize std::pointer_traits<__normal_iterator<I,C>>
This allows std::__to_address to be used with __normal_iterator in
C++11/14/17 modes. Without the partial specialization the deduced
pointer_traits::element_type is incorrect, and so the return type of
__to_address is wrong.
A similar partial specialization is probably needed for
__gnu_debug::_Safe_iterator.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/bits/stl_iterator.h (pointer_traits): Define partial
specialization for __normal_iterator.
* testsuite/24_iterators/normal_iterator/to_address.cc: New test.
Diffstat (limited to 'gcc/gimplify.c')
0 files changed, 0 insertions, 0 deletions