Skip to content

Commit c0ff08a

Browse files
committed
Forgot to rename a variable
1 parent 7cab021 commit c0ff08a

File tree

1 file changed

+13
-13
lines changed
  • libcxx/test/std/utilities/optional/optional.iterator

1 file changed

+13
-13
lines changed

libcxx/test/std/utilities/optional/optional.iterator/end.pass.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020

2121
template <typename T>
2222
constexpr bool test() {
23-
std::optional<T> unengaged{std::nullopt};
24-
const std::optional<T> unengaged2{std::nullopt};
23+
std::optional<T> disengaged{std::nullopt};
24+
const std::optional<T> disengaged2{std::nullopt};
2525

2626
{ // end() is marked noexcept
27-
static_assert(noexcept(unengaged.end()));
28-
static_assert(noexcept(unengaged2.end()));
27+
static_assert(noexcept(disengaged.end()));
28+
static_assert(noexcept(disengaged2.end()));
2929
}
3030

31-
{ // end() == begin() and end() == end() if the optional is unengaged
32-
auto it = unengaged.end();
33-
auto it2 = unengaged2.end();
31+
{ // end() == begin() and end() == end() if the optional is disengaged
32+
auto it = disengaged.end();
33+
auto it2 = disengaged2.end();
3434

35-
assert(it == unengaged.begin());
36-
assert(unengaged.begin() == it);
37-
assert(it == unengaged.end());
35+
assert(it == disengaged.begin());
36+
assert(disengaged.begin() == it);
37+
assert(it == disengaged.end());
3838

39-
assert(it2 == unengaged2.begin());
40-
assert(unengaged2.begin() == it2);
41-
assert(it2 == unengaged2.end());
39+
assert(it2 == disengaged2.begin());
40+
assert(disengaged2.begin() == it2);
41+
assert(it2 == disengaged2.end());
4242
}
4343

4444
std::optional<T> engaged{T{}};

0 commit comments

Comments
 (0)