Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] tests to support new sycl::span deduction guide fix #572

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions SYCL/Basic/span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,22 @@ void testSpanOnDevice() {
}
}

void testSpanDeclarations() {
// test the various declarations, especially unqualified ones.
// should compile
int arr[]{1, 2, 3, 4};
const int constArr[]{8, 7, 6};
sycl::span fromArray{arr};
sycl::span fromConstArray{constArr};

std::vector<int> vec(4);
sycl::span fromVec{vec};
}

int main() {
testSpanCapture();
testSpanOnDevice();
testSpanDeclarations();

return 0;
}