What's the difference between span and array_view in the gsl library?

前端 未结 3 1358
刺人心
刺人心 2020-12-02 12:59

In several recent conference presentation I\'ve heard Bjarne Stroustrup and others mention new coding guidelines for C++ and some types supporting them.

Specificall

3条回答
  •  半阙折子戏
    2020-12-02 13:13

    In the CppCoreGuidlines The original array_view was renamed to span.

    See: https://github.com/isocpp/CppCoreGuidelines/pull/377

    It is described thus:

    span is a bounds-checked, safe alternative to using pointers to access arrays

提交回复
热议问题