Skip to content

Commit cfedf6d

Browse files
authored
LWG Issue 3946対応(P3040R0)
1 parent ce48adc commit cfedf6d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

reference/ranges/const_iterator_t.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
```cpp
88
namespace std::ranges {
99
template<range R>
10-
using const_iterator_t = const_iterator<iterator_t<R>>;
10+
using const_iterator_t = decltype(ranges::cbegin(declval<R&>()));
1111
}
1212
```
1313
* range[link range.md]
14-
* const_iterator[link /reference/iterator/const_iterator.md]
15-
* iterator_t[link iterator_t.md]
14+
* cbegin[link cbegin.md]
15+
* declval[link /reference/utility/declval.md]
1616
1717
## 概要
1818
@@ -47,3 +47,4 @@ int main() {
4747
## 参照
4848

4949
- [P2278R4 `cbegin` should always return a constant iterator](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2278r4.html)
50+
- [LWG Issue 3946. The definition of `const_iterator_t` should be reworked](https://cplusplus.github.io/LWG/issue3946)

reference/ranges/const_sentinel_t.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
```cpp
88
namespace std::ranges {
99
template<range R>
10-
using const_sentinel_t = const_sentinel<sentinel_t<R>>;
10+
using const_sentinel_t = decltype(ranges::cend(declval<R&>()));
1111
}
1212
```
1313
* range[link range.md]
14-
* const_sentinel[link /reference/iterator/const_sentinel.md]
15-
* sentinel_t[link sentinel_t.md]
14+
* cend[link cend.md]
15+
* declval[link /reference/utility/declval.md]
1616
1717
## 概要
1818
@@ -51,3 +51,4 @@ int main() {
5151
## 参照
5252

5353
- [P2278R4 `cbegin` should always return a constant iterator](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2278r4.html)
54+
- [LWG Issue 3946. The definition of `const_iterator_t` should be reworked](https://cplusplus.github.io/LWG/issue3946)

0 commit comments

Comments
 (0)