Skip to content

Commit 13cbe33

Browse files
test runtime behavior of begin
1 parent 7fa196b commit 13cbe33

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libcxx/test/std/ranges/range.adaptors/range.concat/begin.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ constexpr void tests() {
4040
static_assert(std::is_same_v<decltype(v.begin()), decltype(std::as_const(v).begin())>);
4141
assert(v.begin() == std::as_const(v).begin());
4242
assert(*v.begin() == buffer[0]);
43+
assert(*std::as_const(v).begin() == buffer[0]);
4344

4445
using View = decltype(v);
4546
static_assert(HasOnlyConstBegin<View>);
@@ -54,6 +55,7 @@ constexpr void tests() {
5455
static_assert(!std::is_same_v<decltype(v.begin()), decltype(std::as_const(v).begin())>);
5556
assert(v.begin() == std::as_const(v).begin());
5657
assert(*v.begin() == buffer[0]);
58+
assert(*std::as_const(v).begin() == buffer[0]);
5759

5860
using View = decltype(v);
5961
static_assert(!HasOnlyConstBegin<View>);

0 commit comments

Comments
 (0)