gcc/libstdc++-v3/include/bits
Jonathan Wakely 24fe8c8e33 libstdc++: Fix std::to_address for debug iterators (PR 93960)
It should be valid to use std::to_address on a past-the-end iterator,
but the debug mode iterators do a check for dereferenceable in their
operator->(). That check is generally useful, so rather than remove it
this changes std::__to_address to identify a debug mode iterator and
use base().operator->() to skip the check.

	PR libstdc++/93960
	* include/bits/ptr_traits.h (__to_address): Add special case for debug
	iterators, to avoid dereferenceable check.
	* testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
	* testsuite/20_util/to_address/debug.cc: New test.
2020-04-03 10:42:20 +01:00
..
algorithmfwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
alloc_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
allocated_ptr.h Update copyright years. 2020-01-01 12:51:42 +01:00
allocator.h Update copyright years. 2020-01-01 12:51:42 +01:00
atomic_base.h libstdc++: Value-initialize std::atomic for C++20 (P0883R2) 2020-01-13 13:22:28 +00:00
atomic_futex.h Update copyright years. 2020-01-01 12:51:42 +01:00
basic_ios.h Update copyright years. 2020-01-01 12:51:42 +01:00
basic_ios.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
basic_string.h Update copyright years. 2020-01-01 12:51:42 +01:00
basic_string.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
boost_concept_check.h libstdc++: Make _GLIBCXX_CONCEPT_CHECKS more constexpr-friendly 2020-02-27 10:52:28 +00:00
c++0x_warning.h Update copyright years. 2020-01-01 12:51:42 +01:00
c++config libstdc++: Fix freestanding build PR 92376) 2020-01-17 17:03:46 +00:00
char_traits.h Update copyright years. 2020-01-01 12:51:42 +01:00
charconv.h Update copyright years. 2020-01-01 12:51:42 +01:00
codecvt.h Update copyright years. 2020-01-01 12:51:42 +01:00
concept_check.h Update copyright years. 2020-01-01 12:51:42 +01:00
cpp_type_traits.h libstdc++: Fix comment on __memcpyable 2020-03-04 15:35:20 +00:00
deque.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
enable_special_members.h Update copyright years. 2020-01-01 12:51:42 +01:00
erase_if.h libstdc++: Update __cpp_lib_erase_if macro (P1115R3) 2020-02-15 10:25:23 +00:00
forward_list.h Update copyright years. 2020-01-01 12:51:42 +01:00
forward_list.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
fs_dir.h Update copyright years. 2020-01-01 12:51:42 +01:00
fs_fwd.h libstdc++: Define and use chrono::is_clock for C++20 2020-03-25 22:07:02 +00:00
fs_ops.h Update copyright years. 2020-01-01 12:51:42 +01:00
fs_path.h libstdc++: Fix path::generic_string allocator handling (PR 94242) 2020-03-21 22:04:48 +00:00
fstream.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
functexcept.h Update copyright years. 2020-01-01 12:51:42 +01:00
functional_hash.h Update copyright years. 2020-01-01 12:51:42 +01:00
gslice_array.h Update copyright years. 2020-01-01 12:51:42 +01:00
gslice.h Update copyright years. 2020-01-01 12:51:42 +01:00
hashtable_policy.h libstdc++ Hastable: Move std::is_permutation to limit includes 2020-02-29 18:40:39 +01:00
hashtable.h libstdc++: Add missing std:: qualification of a forward call 2020-02-12 22:09:41 +01:00
indirect_array.h Update copyright years. 2020-01-01 12:51:42 +01:00
int_limits.h libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546) 2020-02-17 15:11:04 +00:00
invoke.h Update copyright years. 2020-01-01 12:51:42 +01:00
ios_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
istream.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
iterator_concepts.h libstdc++: Implement C++20 changes to insert iterators 2020-03-27 23:26:01 +00:00
list.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
locale_classes.h Update copyright years. 2020-01-01 12:51:42 +01:00
locale_classes.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
locale_conv.h Update copyright years. 2020-01-01 12:51:42 +01:00
locale_facets_nonio.h Update copyright years. 2020-01-01 12:51:42 +01:00
locale_facets_nonio.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
locale_facets.h Update copyright years. 2020-01-01 12:51:42 +01:00
locale_facets.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
localefwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
mask_array.h Update copyright years. 2020-01-01 12:51:42 +01:00
memoryfwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
move.h Update copyright years. 2020-01-01 12:51:42 +01:00
node_handle.h Update copyright years. 2020-01-01 12:51:42 +01:00
ostream_insert.h Update copyright years. 2020-01-01 12:51:42 +01:00
ostream.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
parse_numbers.h libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546) 2020-02-17 15:11:04 +00:00
postypes.h Update copyright years. 2020-01-01 12:51:42 +01:00
predefined_ops.h Update copyright years. 2020-01-01 12:51:42 +01:00
ptr_traits.h libstdc++: Fix std::to_address for debug iterators (PR 93960) 2020-04-03 10:42:20 +01:00
quoted_string.h Update copyright years. 2020-01-01 12:51:42 +01:00
random.h libstdc++: Reduce header dependencies for C++20 (PR 92546) 2020-02-17 15:43:43 +00:00
random.tcc libstdc++: Fix undefined behaviour in random dist serialization (PR93205) 2020-01-09 16:50:51 +00:00
range_access.h libstdc++: Implement C++20 changes to insert iterators 2020-03-27 23:26:01 +00:00
range_cmp.h libstdc++: Define __cpp_lib_ranges macro for C++20 2020-03-27 23:26:03 +00:00
ranges_algo.h libstdc++: Workaround is_trivially_copyable<volatile T> (PR 94013) 2020-03-03 21:39:19 +00:00
ranges_algobase.h libstdc++: Fix incorrect use of memset in ranges::fill_n (PR 94017) 2020-03-03 22:46:39 -05:00
ranges_uninitialized.h libstdc++: Move-only input iterator support in <memory> algorithms (LWG 3355) 2020-03-03 22:44:39 -05:00
refwrap.h libstdc++: Avoid using sizeof with function types (PR 93470) 2020-01-28 13:24:09 +00:00
regex_automaton.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_automaton.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
regex_compiler.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_compiler.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
regex_constants.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_error.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_executor.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_executor.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
regex_scanner.h Update copyright years. 2020-01-01 12:51:42 +01:00
regex_scanner.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
regex.h libstdc++: enable_view has false positives (LWG 3326) 2020-02-24 12:15:05 +00:00
regex.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
shared_ptr_atomic.h Update copyright years. 2020-01-01 12:51:42 +01:00
shared_ptr_base.h Update copyright years. 2020-01-01 12:51:42 +01:00
shared_ptr.h Update copyright years. 2020-01-01 12:51:42 +01:00
slice_array.h Update copyright years. 2020-01-01 12:51:42 +01:00
specfun.h Update copyright years. 2020-01-01 12:51:42 +01:00
sstream.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
std_abs.h Update copyright years. 2020-01-01 12:51:42 +01:00
std_function.h Update copyright years. 2020-01-01 12:51:42 +01:00
std_mutex.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_algo.h libstdc++ Hastable: Move std::is_permutation to limit includes 2020-02-29 18:40:39 +01:00
stl_algobase.h libstdc++: Fix compilation with released versions of Clang 2020-03-18 12:55:29 +00:00
stl_bvector.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_construct.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_deque.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_function.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_heap.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_iterator_base_funcs.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_iterator_base_types.h libstdc++: Define __cpp_lib_ranges macro for C++20 2020-03-27 23:26:03 +00:00
stl_iterator.h libstdc++: Fix std::reverse_iterator relational operators 2020-03-28 21:52:13 +00:00
stl_list.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_map.h rename local _C2 identifiers in stl map header files 2020-01-09 23:00:50 +00:00
stl_multimap.h rename local _C2 identifiers in stl map header files 2020-01-09 23:00:50 +00:00
stl_multiset.h libstdc++: enable_view has false positives (LWG 3326) 2020-02-24 12:15:05 +00:00
stl_numeric.h libstdc++: P1645R1 constexpr for <numeric> algorithms 2020-02-26 10:23:17 -05:00
stl_pair.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_queue.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_raw_storage_iter.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_relops.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_set.h libstdc++: enable_view has false positives (LWG 3326) 2020-02-24 12:15:05 +00:00
stl_stack.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_tempbuf.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_tree.h PR libstdc++/92124 fix incorrect container move assignment 2020-01-07 21:01:37 +00:00
stl_uninitialized.h Update copyright years. 2020-01-01 12:51:42 +01:00
stl_vector.h Update copyright years. 2020-01-01 12:51:42 +01:00
stream_iterator.h libstdc++: Fix compilation with released versions of Clang 2020-03-18 12:55:29 +00:00
streambuf_iterator.h libstdc++: Fix compilation with released versions of Clang 2020-03-18 12:55:29 +00:00
streambuf.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
string_view.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
stringfwd.h Update copyright years. 2020-01-01 12:51:42 +01:00
uniform_int_dist.h libstdc++: Reduce header dependencies for C++20 (PR 92546) 2020-02-17 15:43:43 +00:00
unique_lock.h Update copyright years. 2020-01-01 12:51:42 +01:00
unique_ptr.h libstdc++: Fix regressions in unique_ptr::swap (PR 93562) 2020-02-04 13:02:37 +00:00
unordered_map.h Update copyright years. 2020-01-01 12:51:42 +01:00
unordered_set.h libstdc++: enable_view has false positives (LWG 3326) 2020-02-24 12:15:05 +00:00
uses_allocator.h Update copyright years. 2020-01-01 12:51:42 +01:00
valarray_after.h Update copyright years. 2020-01-01 12:51:42 +01:00
valarray_array.h Update copyright years. 2020-01-01 12:51:42 +01:00
valarray_array.tcc Update copyright years. 2020-01-01 12:51:42 +01:00
valarray_before.h Update copyright years. 2020-01-01 12:51:42 +01:00
vector.tcc Update copyright years. 2020-01-01 12:51:42 +01:00