d: Merge dmd, druntime c7902293d7, phobos 03aeafd20
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / span / trivially_copyable.cc
blobae4f4b64e13e929fa84a63b123a4477c6d1d47fa
1 // { dg-do compile { target c++20 } }
3 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2251r1.pdf
5 #include <span>
7 static_assert( std::is_trivially_copyable_v<std::span<int>> );
8 static_assert( std::is_trivially_copyable_v<std::span<int, 42>> );
10 struct NonTrivial { NonTrivial(); NonTrivial(const NonTrivial&); };
11 static_assert( std::is_trivially_copyable_v<std::span<NonTrivial>> );
12 static_assert( std::is_trivially_copyable_v<std::span<NonTrivial, 99>> );