c++ - What's the difference between span and array_view in the gsl library? -
in several recent conference presentation i've heard bjarne stroustrup , others mention new coding guidelines c++ , types supporting them.
specifically, remember the example of span<t>
instead of (t* p, int n)
parameter function (at time 32:00 talk); remember suggestion use array_view<t>
. 2 alternatives same concept? or confusing things , they're not related?
i can't seem find authoritative definition of they're both supposed about.
we talked people in library working group in standards committee. wanted array_view
trying standard read only. core guidelines, needed abstraction read , write. avoid clash between (potential) standards , guidelines support library (gsl), renamed our (read , write) array_view
span
: https://github.com/microsoft/gsl .
Comments
Post a Comment