Henri Sivonen <hsivo...@hsivonen.fi> wrote: > On Thu, Oct 1, 2015 at 9:58 PM, Jonathan Watt <jw...@jwatt.org> wrote: > > For those who are interested in this, there's a bug to consider > integrating > > the Guidelines Support Library (GSL) into the tree: > > > > https://bugzilla.mozilla.org/show_bug.cgi?id=1208262 > > This bug appears to have stalled. > > What should my expectations be regarding getting an equivalent of (at > least single-dimensional) GSL span<T> (formerly array_view<T>; > conceptually Rust's slice) into MFBT? > > > On 30/09/2015 22:00, Botond Ballo wrote: > >> The document is a work in progress, still incomplete in many places. > >> The initial authors are Bjarne Stroustrup and Herb Sutter, two members > >> of the C++ Standards Committee, and they welcome contributions via > >> GitHub to help complete and improve it. > > In their keynotes, a template called array_buffer was mentioned. What > happened to it? array_buffer<T> was supposed to be array_view<T> > (since renamed to span<T>) plus an additional size_t communicating > current position in the buffer. Surprisingly, Core Guidelines has an > example of reading up to n items into span but the example doesn't > show how the function would signal how many bytes between 0 and n it > actually read, so the Guidelines themselves don't seem to give a > proper answer to signaling how many items of a span a function read or > wrote. >
This functionality already exists--in a safer form than the Core C++ form--in Gecko: mozilla::pkix::Input and mozilla::pkix::Reader. Cheers, Brian -- https://briansmith.org/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform