What is gsl::multi_span to be used for?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The C++ core guidelines mention spans, not "multi-spans". But - I see that Microsoft's GSL implementation has a multi_span class template < typename ValueType, std::ptrdiff_t FirstDimension, std::ptrdiff_t... RestDimensions > class multi_span { ... }; So, obviously this is some sort of a multi-dimensional version of gsl::span . But what is that supposed to mean? Why do we need this multi-dimensional span, or rather - when would we use it? I can't seem to find any documentation on this. 回答1: In short, it is a span over contiguous piece of