Date: Thu, 17 Aug 2023 23:11:51 +0200
See also
http://cplusplus.github.io/LWG/lwg-closed.html#930 (Access to std::array data as built-in array type)
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0635r0.pdf (Add c_array() member function to std::array)
https://gist.github.com/Morwenn/e49214c196353c29555678b3470e6f13 (State of C arrays in C++)
-----Ursprüngliche Nachricht-----
Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Do 17.08.2023 22:21
Betreff:Re: [std-proposals] Only reason I don‘t use std::array
An:std-proposals_at_[hidden];
CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>;
On Thu, Aug 17, 2023 at 9:08 PM Lénárd Szolnoki wrote:
>
> foo(a, pretend_is_std_array(a.arr)); // breaking the aliasing
> assumption here
I'll get to the point here:
How about we explicitly write in the C++26 Standard that T[len] and
array<T,len> are ABI-compatible, and also provide two functions:
stdarray_to_array
array_to_stdarray
, both of which return a reference to an object that doesn't
malfunction where you have anti-aliasing optimisations.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2023-08-17 21:11:53