Patrick Palka
2d3142c009
libstdc++: Correctly implement LWG 3946 changes to const_iterator_t [PR122842]
...
LWG 3946 made const_iterator_t/sentinel_t agree with ranges::cbegin/cend
by defining the aliases in terms of the CPOs, but I defined it the other
way around in an incorrect way that made the aliases not consider
range-ness of const T via __possibly_const_range. This patch
reimplements the proposed resolution in a more obviously correct way,
mirroring the wording.
PR libstdc++/122842
libstdc++-v3/ChangeLog:
* include/bits/ranges_base.h (__access:_CBegin): Define in
terms of const_iterator directly, not const_iterator_t.
(__access::_CEnd): Likewise in terms of const_sentinel vs
const_sentinel_t.
(const_iterator_t): Move down definition and define in terms
of ranges::cbegin as per LWG 3946.
(const_sentinel_t): Likewise in terms of ranges::cend.
* testsuite/24_iterators/const_iterator/1.cc (test02): Correct
test for int[], std::array and std::vector. Also test
std::string.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com >
Reviewed-by: Jonathan Wakely <jwakely@redhat.com >
2025-11-28 15:38:04 -05:00
..
2025-03-27 13:47:30 +01:00
2025-08-21 11:54:41 +02:00
2025-01-02 11:59:57 +01:00
2025-05-22 14:20:35 +02:00
2025-01-02 11:59:57 +01:00
2025-11-15 21:45:44 +00:00
2025-01-10 21:06:21 +00:00
2025-11-27 09:43:46 +00:00
2025-11-27 09:43:46 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-11-19 09:14:05 -08:00
2025-04-15 09:24:58 +01:00
2025-09-04 15:30:00 +02:00
2025-05-29 11:49:03 +01:00
2025-01-02 11:59:57 +01:00
2025-06-04 14:55:40 -04:00
2025-04-29 10:52:59 +01:00
2025-01-02 11:59:57 +01:00
2025-10-10 09:23:01 +02:00
2025-10-15 21:54:56 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-04-15 09:24:58 +01:00
2025-07-11 08:34:17 +01:00
2025-06-02 13:52:35 +02:00
2025-09-27 21:18:42 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-10-10 09:00:22 +02:00
2025-11-13 14:29:15 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-11-18 11:51:16 +01:00
2025-01-02 11:59:57 +01:00
2025-07-15 10:25:34 +01:00
2025-10-20 17:42:19 +02:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-02-25 22:27:14 +01:00
2025-10-14 15:47:20 +01:00
2025-01-02 11:59:57 +01:00
2025-10-08 17:06:20 +01:00
2025-01-02 11:59:57 +01:00
2025-11-03 18:55:06 +03:00
2025-01-02 11:59:57 +01:00
2025-09-11 14:38:59 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-08 12:45:37 +00:00
2025-04-29 10:52:59 +01:00
2025-01-02 11:59:57 +01:00
2025-03-19 23:29:06 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-07-11 08:34:13 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-06-02 13:52:35 +02:00
2025-01-02 11:59:57 +01:00
2025-08-26 18:16:04 +02:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-04-29 10:52:59 +01:00
2025-01-02 11:59:57 +01:00
2024-09-25 08:20:45 -04:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-09-26 11:05:49 +01:00
2025-05-06 17:19:25 +01:00
2025-11-03 21:32:25 +03:00
2025-10-07 12:11:21 +01:00
2025-09-26 11:01:08 +01:00
2025-02-15 10:58:56 +00:00
2025-09-17 14:14:37 -04:00
2025-08-18 14:05:06 +02:00
2025-11-28 15:38:04 -05:00
2025-11-26 11:45:30 +01:00
2025-07-15 10:25:48 +01:00
2025-09-17 14:14:37 -04:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-11-21 15:30:49 +00:00
2025-04-29 19:54:35 +01:00
2025-04-29 19:54:35 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-04-29 19:54:35 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-08 12:45:37 +00:00
2025-10-29 21:41:12 +00:00
2025-10-07 12:15:28 +01:00
2025-11-27 09:43:24 +00:00
2025-10-14 14:38:30 +02:00
2025-10-11 00:09:19 +01:00
2025-07-09 12:14:40 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-05-27 12:11:43 +01:00
2025-04-29 10:52:59 +01:00
2025-10-14 17:26:42 +01:00
2025-01-02 11:59:57 +01:00
2025-09-26 11:05:59 +01:00
2025-09-26 11:05:59 +01:00
2025-04-11 13:56:03 +02:00
2025-09-22 15:59:21 +02:00
2025-09-23 16:38:28 +01:00
2025-09-26 11:05:49 +01:00
2025-09-26 11:05:49 +01:00
2025-10-22 14:48:04 +01:00
2025-07-19 00:10:10 +01:00
2025-07-07 21:50:51 +01:00
2025-04-11 13:56:03 +02:00
2025-10-14 15:47:20 +01:00
2025-10-14 15:47:20 +01:00
2025-10-14 15:47:20 +01:00
2025-01-02 11:59:57 +01:00
2025-09-03 12:16:18 +01:00
2025-04-25 13:02:04 +02:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-10-14 15:47:20 +01:00
2025-04-25 13:02:04 +02:00
2025-06-12 18:41:30 +02:00
2025-10-14 15:47:20 +01:00
2025-10-01 13:54:59 +01:00
2025-08-26 18:18:32 +02:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-10-15 21:54:56 +01:00
2025-10-08 18:02:39 +02:00
2025-11-14 18:27:01 +01:00
2025-04-29 10:52:59 +01:00
2025-03-06 16:46:19 +00:00
2025-09-10 23:24:10 +01:00
2025-10-14 15:47:20 +01:00
2025-10-14 15:47:20 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-10-27 11:48:49 +01:00
2025-01-02 11:59:57 +01:00
2025-10-27 09:54:55 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-08-26 18:18:32 +02:00
2025-11-26 08:35:48 +01:00
2025-11-26 08:35:48 +01:00
2025-10-09 15:25:59 +01:00