Skip to content

Commit 510ab36

Browse files
change name test file and remove header file
1 parent 5448182 commit 510ab36

File tree

2 files changed

+17
-33
lines changed

2 files changed

+17
-33
lines changed

libcxx/test/libcxx/ranges/range.adaptors/range.concat/ctor.pass.cpp renamed to libcxx/test/libcxx/ranges/range.adaptors/range.concat/iterator.valueless_by_exception.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,23 @@
1313
#include <utility>
1414

1515
#include "check_assertion.h"
16-
#include "types.h"
16+
17+
int globalArray[8] = {0, 1, 2, 3, 4, 5, 6, 7};
18+
19+
struct ThrowOnCopyView : std::ranges::view_base {
20+
int start_;
21+
int* ptr_;
22+
constexpr explicit ThrowOnCopyView(int* ptr = globalArray, int start = 0) : start_(start), ptr_(ptr) {}
23+
constexpr ThrowOnCopyView(ThrowOnCopyView&&) = default;
24+
constexpr ThrowOnCopyView(const ThrowOnCopyView&) { throw 42; };
25+
constexpr ThrowOnCopyView& operator=(ThrowOnCopyView&&) = default;
26+
constexpr ThrowOnCopyView& operator=(const ThrowOnCopyView&) {
27+
throw 42;
28+
return *this;
29+
};
30+
constexpr int* begin() const { return ptr_ + start_; }
31+
constexpr int* end() const { return ptr_ + 8; }
32+
};
1733

1834
int main() {
1935
{

libcxx/test/libcxx/ranges/range.adaptors/range.concat/types.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)