gcc/libstdc++-v3/testsuite/23_containers/span
Jonathan Wakely 0f7cd5e573 libstdc++: Make std::span layout-compatible with struct iovec [PR 95609]
This change reorders the data members of std::span so that span<byte> is
layout-compatible with common implementations of struct iovec. This will
allow span<byte> to be used directly in places that use a struct iovec
to do scatter-gather I/O.

It's important to note that POSIX doesn't specify the order of members
in iovec. Also the equivalent type on Windows has members in the other
order, and uses type ULONG (which is always 32-bit whereas size_t is
64-bit for Win64). So this change will only help for certain targets and
an indirection between std::span and I/O system calls will still be
needed for the general case.

libstdc++-v3/ChangeLog:

	PR libstdc++/95609
	* include/std/span (span): Reorder data members to match common
	implementations of struct iovec.
	* testsuite/23_containers/span/layout_compat.cc: New test.
2020-10-28 12:07:40 +00:00
..
1.cc libstdc++: P1976R2 Fixed-size span construction from dynamic range 2020-02-18 17:43:36 +00:00
2.cc libstdc++: P1976R2 Fixed-size span construction from dynamic range 2020-02-18 17:43:36 +00:00
back_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
back_neg.cc libstdc++: Remove overzealous static_asserts from std::span 2020-09-21 23:21:34 -04:00
contiguous_range_neg.cc Update copyright years. 2020-01-01 12:51:42 +01:00
deduction.cc libstdc++: span's deduction-guide for built-in arrays doesn't work (LWG 3369) 2020-02-19 15:28:33 +00:00
everything.cc libstdc++: Remove std::span::cbegin and std::span::cend (LWG 3320) 2020-02-19 15:27:49 +00:00
explicit.cc libstdc++: P1976R2 Fixed-size span construction from dynamic range 2020-02-18 17:43:36 +00:00
first_2_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
first_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
first_neg.cc Update copyright years. 2020-01-01 12:51:42 +01:00
front_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
front_neg.cc libstdc++: Remove overzealous static_asserts from std::span 2020-09-21 23:21:34 -04:00
index_op_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
index_op_neg.cc libstdc++: Remove overzealous static_asserts from std::span 2020-09-21 23:21:34 -04:00
last_2_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
last_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
last_neg.cc Update copyright years. 2020-01-01 12:51:42 +01:00
layout_compat.cc libstdc++: Make std::span layout-compatible with struct iovec [PR 95609] 2020-10-28 12:07:40 +00:00
lwg3255.cc libstdc++: span's deduction-guide for built-in arrays doesn't work (LWG 3369) 2020-02-19 15:28:33 +00:00
nothrow_cons.cc Update copyright years. 2020-01-01 12:51:42 +01:00
subspan_2_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_3_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_4_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_5_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_6_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_assert_neg.cc libstdc++: Add dg-require-effective-target to std::span assert tests 2020-07-31 19:58:02 +01:00
subspan_neg.cc Update copyright years. 2020-01-01 12:51:42 +01:00