mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
moving decl so we dont get the stl_nullptr is not used warning
This commit is contained in:
parent
f8bcb7d9eb
commit
6eab19d3c1
@ -46,12 +46,12 @@ TEST(span_compatibility_tests, assertion_tests)
|
||||
{
|
||||
int arr[3]{10, 20, 30};
|
||||
std::array<int, 3> stl{{100, 200, 300}};
|
||||
std::array<int*, 3> stl_nullptr{{nullptr, nullptr, nullptr}};
|
||||
|
||||
#if __cplusplus >= 201703l
|
||||
// This std::is_convertible_v<int*(*)[], int const* const(*)[]> fails for C++14
|
||||
// so these conversions aren't valid in C++14
|
||||
{
|
||||
std::array<int*, 3> stl_nullptr{{nullptr, nullptr, nullptr}};
|
||||
gsl::span<const int* const> sp_const_nullptr_1{stl_nullptr};
|
||||
EXPECT_TRUE(sp_const_nullptr_1.data() == stl_nullptr.data());
|
||||
EXPECT_TRUE(sp_const_nullptr_1.size() == 3);
|
||||
|
Loading…
Reference in New Issue
Block a user