Add compilation error test for as_writable_bytes

This commit is contained in:
MikeGitb 2016-12-08 16:15:39 +01:00
parent 7f2645a4d9
commit cfff3cde62

View File

@ -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
} }