In several recent conference presentation I've heard Bjarne Stroustrup and others mention new coding guidelines for C++ and some types supporting them.
Specifically, I remember the example of span<T>
instead of (T* p, int n)
as a parameter to a function (at time about 32:00 into the talk); but I also remember the suggestion to use array_view<T>
. Are they two alternatives but the same concept? Or am I confusing things and they're actually not so related?
I can't seem to find any authoritative definition of what they're both supposed to be about.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…