mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
parent
43d60c5e38
commit
1d036585cc
@ -1380,3 +1380,16 @@ TEST(span_test, std_span)
|
|||||||
EXPECT_TRUE(std_span.size() == gsl_span.size());
|
EXPECT_TRUE(std_span.size() == gsl_span.size());
|
||||||
}
|
}
|
||||||
#endif // defined(FORCE_STD_SPAN_TESTS) || defined(__cpp_lib_span) && __cpp_lib_span >= 202002L
|
#endif // defined(FORCE_STD_SPAN_TESTS) || defined(__cpp_lib_span) && __cpp_lib_span >= 202002L
|
||||||
|
|
||||||
|
#if defined(__cpp_lib_span) && defined(__cpp_lib_ranges)
|
||||||
|
// This test covers the changes in PR #1100
|
||||||
|
TEST(span_test, msvc_compile_error_PR1100)
|
||||||
|
{
|
||||||
|
int arr[]{1, 7, 2, 9};
|
||||||
|
gsl::span sp{arr, std::size(arr)};
|
||||||
|
std::ranges::sort(sp);
|
||||||
|
for (const auto& e : sp) {
|
||||||
|
(void)e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // defined(__cpp_lib_span) && defined(__cpp_lib_ranges)
|
||||||
|
Loading…
Reference in New Issue
Block a user