Skip to content

Commit dafb95e

Browse files
committed
noexcept test
1 parent ca3055a commit dafb95e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

libcxx/include/__ranges/chunk_view.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class chunk_view<_View>::__inner_iterator {
194194

195195
chunk_view* __parent_;
196196

197-
_LIBCPP_HIDE_FROM_ABI constexpr explicit __inner_iterator(chunk_view& __parent)
197+
_LIBCPP_HIDE_FROM_ABI constexpr explicit __inner_iterator(chunk_view& __parent) noexcept
198198
: __parent_(std::addressof(__parent)) {}
199199

200200
public:

libcxx/test/std/ranges/range.adaptors/range.chunk/adaptor.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ constexpr bool test() {
3838

3939
// Test `views::chunk(n)(range)`
4040
{
41+
static_assert(noexcept(std::views::chunk(2)));
4142
auto adaptor = std::views::chunk(3);
4243
std::same_as<std::ranges::chunk_view<std::ranges::ref_view<std::array<int, 8>>>> decltype(auto) chunked =
4344
adaptor(view);

libcxx/test/std/ranges/range.adaptors/range.chunk/end.pass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ constexpr bool test() {
3535

3636
// Test `chunk_view.end()` when V models only input_range
3737
{
38+
static_assert(noexcept(input_chunked.end()));
3839
[[maybe_unused]] std::same_as<std::default_sentinel_t> auto it = input_chunked.end();
3940
}
4041

0 commit comments

Comments
 (0)