Date: Thu, 7 Nov 2024 11:34:16 +0100
Dealing with ABI incompatibilities between different implementations
is outside the scope of the standard.
In any case, just checking if the result of std::layout_of (in your
case) matches expectations doesn't seem sufficient. You can implement
std::span using a pair of pointers or using a pointer and a size for
example, and both would likely have a layout of {8, 8, 8, 8} but this
doesn't tell you anything about padding bytes yet, or which
implementation was actually used.
is outside the scope of the standard.
In any case, just checking if the result of std::layout_of (in your
case) matches expectations doesn't seem sufficient. You can implement
std::span using a pair of pointers or using a pointer and a size for
example, and both would likely have a layout of {8, 8, 8, 8} but this
doesn't tell you anything about padding bytes yet, or which
implementation was actually used.
Received on 2024-11-07 10:34:29