Skip to content

Commit d825a2f

Browse files
JohelEGPjensmaurer
authored andcommitted
[range.common.view] Declare size after begin/end like in the other views (#3598)
1 parent ccd9087 commit d825a2f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/ranges.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5802,13 +5802,6 @@
58025802
constexpr V base() const& requires copy_constructible<V> { return @\exposid{base_}@; }
58035803
constexpr V base() && { return std::move(@\exposid{base_}@); }
58045804

5805-
constexpr auto size() requires sized_range<V> {
5806-
return ranges::size(@\exposid{base_}@);
5807-
}
5808-
constexpr auto size() const requires sized_range<const V> {
5809-
return ranges::size(@\exposid{base_}@);
5810-
}
5811-
58125805
constexpr auto begin() {
58135806
if constexpr (random_access_range<V> && sized_range<V>)
58145807
return ranges::begin(@\exposid{base_}@);
@@ -5836,6 +5829,13 @@
58365829
else
58375830
return common_iterator<iterator_t<const V>, sentinel_t<const V>>(ranges::end(@\exposid{base_}@));
58385831
}
5832+
5833+
constexpr auto size() requires sized_range<V> {
5834+
return ranges::size(@\exposid{base_}@);
5835+
}
5836+
constexpr auto size() const requires sized_range<const V> {
5837+
return ranges::size(@\exposid{base_}@);
5838+
}
58395839
};
58405840

58415841
template<class R>

0 commit comments

Comments
 (0)