Skip to content

add GSL to external libraries

Sebastian Keller requested to merge gsl-span into master

The Guidelines Support Library (GSL) contains functions and types that are suggested for use by the C++ Core Guidelines maintained by the Standard C++ Foundation.

Specifically, it contains gsl::span, which will become std::span in C++20. std::span is equivalent to gmx::ArrayRef and can be used interchangeably, i.e. a std::span object is constructible from e.g. a std::vector and can be used as an argument to a function expecting a gmx::ArrayRef.

Adopting std::span would eventually eliminate the need to maintain gmx::ArrayRef and also facilitate exposure of public APIs that depend on data views.

GSL is available as a single-file implementation from https://github.com/gsl-lite/gsl-lite

Merge request reports