Skip to content

Commit

Permalink
Minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
H-G-Hristov committed Jul 10, 2024
1 parent 7430afd commit 90764f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ constexpr void test_empty(T value) {
using SingleView = std::ranges::single_view<T>;
SingleView sv{value};

assert(!SingleView::empty());
std::same_as<bool> decltype(auto) result = SingleView::empty();
assert(result == false);
static_assert(noexcept(SingleView::empty()));
static_assert(noexcept(std::ranges::empty(sv)));
static_assert(noexcept(std::ranges::empty(std::as_const(sv))));
Expand Down

0 comments on commit 90764f0

Please sign in to comment.