Skip to content

Commit 99e6d33

Browse files
committed
[cxx-interop] attempt to fix windows unique ptr test
1 parent 580ecd0 commit 99e6d33

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/Interop/Cxx/stdlib/Inputs/std-unique-ptr.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ std::unique_ptr<int[]> makeArray() {
1717

1818
static bool dtorCalled = false;
1919
struct HasDtor {
20+
HasDtor() = default;
21+
#if __is_target_os(windows)
22+
// On windows, force this type to be address-only.
23+
HasDtor(const StructWithDestructor &other);
24+
#endif
2025
~HasDtor() {
2126
dtorCalled = true;
2227
}
28+
private:
29+
int x;
2330
};
2431

2532
std::unique_ptr<HasDtor> makeDtor() {

0 commit comments

Comments
 (0)