mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Add compilation error test for as_writable_bytes
This commit is contained in:
parent
7f2645a4d9
commit
cfff3cde62
@ -1478,9 +1478,10 @@ SUITE(span_tests)
|
|||||||
MyTC_t dst{ 1 };
|
MyTC_t dst{ 1 };
|
||||||
auto src_b = as_bytes(src);
|
auto src_b = as_bytes(src);
|
||||||
auto dst_b = as_writeable_bytes(dst);
|
auto dst_b = as_writeable_bytes(dst);
|
||||||
std::copy(src_b.begin(), src_b.end(), dst_b.begin());
|
}
|
||||||
CHECK(std::equal(src_b.begin(), src_b.end(), dst_b.begin()));
|
{
|
||||||
CHECK(src == dst);
|
const std::array<int, 4> data{ 1, 2, 3, 4 };
|
||||||
|
auto raw = as_writeable_bytes(data);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user